mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 06:45:32 +00:00
91a377df86
The map now will track player's position/rotation when pinned, and will not update if position/rotation didn't change since last frame.
35 lines
1 KiB
C++
35 lines
1 KiB
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;
|
|
float mLastPositionX;
|
|
float mLastPositionY;
|
|
float mLastDirectionX;
|
|
float mLastDirectionY;
|
|
};
|
|
}
|
|
#endif
|