mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
Minimap, hotkeys and lot of other changes
* Begin working on a new layout system for UIMinimap and later UIMap, this new layout system allows to add widgets to the minimap * Add option to disable motd * Rework hotkey binding * Lots of fixes in hotkeys manager * Add fullmap view using Ctrl+Shift+M * Prevent some crashs in ThingType draw * Add function to load minimap from PNG files * Fixes in minimap saving * Fixes in Tile::isClickable * Add UIMapAnchorLayout, new layout for maps * Fix freezes in win32 when pressing alt key
This commit is contained in:
@@ -40,26 +40,32 @@ public:
|
||||
void setMinZoom(int minZoom) { m_minZoom = minZoom; }
|
||||
void setMaxZoom(int maxZoom) { m_maxZoom = maxZoom; }
|
||||
void setCameraPosition(const Position& pos);
|
||||
void setCross(bool enable) { m_crossEnabled = enable; }
|
||||
void followCreature(const CreaturePtr& creature);
|
||||
bool floorUp();
|
||||
bool floorDown();
|
||||
|
||||
Point getPoint(const Position& pos);
|
||||
Position getPosition(const Point& mousePos);
|
||||
Position getCameraPosition();
|
||||
CreaturePtr getFollowingCreature() { return m_followingCreature; }
|
||||
Point getTilePoint(const Position& pos);
|
||||
Rect getTileRect(const Position& pos);
|
||||
Position getTilePosition(const Point& mousePos);
|
||||
|
||||
Position getCameraPosition() { return m_cameraPosition; }
|
||||
int getMinZoom() { return m_minZoom; }
|
||||
int getMaxZoom() { return m_maxZoom; }
|
||||
int getZoom() { return m_zoom; }
|
||||
bool getCross() { return m_crossEnabled; }
|
||||
float getScale() { return m_scale; }
|
||||
|
||||
void anchorPosition(const UIWidgetPtr& anchoredWidget, Fw::AnchorEdge anchoredEdge, const Position& hookedPosition, Fw::AnchorEdge hookedEdge);
|
||||
void fillPosition(const UIWidgetPtr& anchoredWidget, const Position& hookedPosition);
|
||||
void centerInPosition(const UIWidgetPtr& anchoredWidget, const Position& hookedPosition);
|
||||
|
||||
protected:
|
||||
virtual void onZoomChange(int zoom, int oldZoom);
|
||||
virtual void onCameraPositionChange(const Position& position, const Position& oldPosition);
|
||||
virtual void onStyleApply(const std::string& styleName, const OTMLNodePtr& styleNode);
|
||||
|
||||
private:
|
||||
void update();
|
||||
|
||||
Rect m_mapArea;
|
||||
bool m_crossEnabled;
|
||||
CreaturePtr m_followingCreature;
|
||||
Position m_cameraPosition;
|
||||
float m_scale;
|
||||
int m_zoom;
|
||||
|
Reference in New Issue
Block a user