mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
ef0a185e11
Hide elements of the HUD (health/magicka/stamina bars, minimap) when the corresponding windows (stats/map) are pinned. Rearrange the remaining hud elements in such cases (like in the original Morrowind).
35 lines
983 B
C++
35 lines
983 B
C++
#ifndef MWGUI_MAPWINDOW_H
|
|
#define MWGUI_MAPWINDOW_H
|
|
|
|
#include "layouts.hpp"
|
|
#include "window_pinnable_base.hpp"
|
|
|
|
namespace MWGui
|
|
{
|
|
class MapWindow : public MWGui::WindowPinnableBase, public LocalMapBase
|
|
{
|
|
public:
|
|
MapWindow(WindowManager& parWindowManager);
|
|
virtual ~MapWindow(){}
|
|
|
|
void setPlayerPos(const float x, const float y);
|
|
void setPlayerDir(const float x, const float y);
|
|
void setCellName(const std::string& cellName);
|
|
|
|
private:
|
|
void onDragStart(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id);
|
|
void onMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id);
|
|
void onWorldButtonClicked(MyGUI::Widget* _sender);
|
|
|
|
MyGUI::ScrollView* mGlobalMap;
|
|
MyGUI::ImageBox* mPlayerArrow;
|
|
MyGUI::Button* mButton;
|
|
MyGUI::IntPoint mLastDragPos;
|
|
bool mGlobal;
|
|
|
|
protected:
|
|
virtual void onPinToggled();
|
|
};
|
|
}
|
|
#endif
|