diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-25 22:50:59 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-25 22:50:59 +0100 |
commit | cc79f0fe21e1a2ef73cbe987d54e848b9a47142d (patch) | |
tree | edd316eb6094f0c02d6d014385865dcd88a2bc56 /src/gui/viewport.h | |
parent | b0df784f1be44a657ca8092069488602270629b7 (diff) | |
parent | 99e8a3fd77b63a029fe02dcf771b6af1aad252ed (diff) | |
download | mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.gz mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.bz2 mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.xz mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.zip |
Merge branch 'eathena/master'
Conflicts:
A lot of files.
Diffstat (limited to 'src/gui/viewport.h')
-rw-r--r-- | src/gui/viewport.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/gui/viewport.h b/src/gui/viewport.h index a097a4ac..c051e5a2 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -124,6 +124,16 @@ class Viewport : public WindowContainer, public gcn::MouseListener, int getCameraY() const { return (int) mPixelViewY; } /** + * Returns mouse x in pixels. + */ + int getMouseX() const { return mMouseX; } + + /** + * Returns mouse y in pixels. + */ + int getMouseY() const { return mMouseY; } + + /** * Changes viewpoint by relative pixel coordinates. */ void scrollBy(float x, float y) { mPixelViewX += x; mPixelViewY += y; } @@ -140,18 +150,20 @@ class Viewport : public WindowContainer, public gcn::MouseListener, */ void drawPath(Graphics *graphics, const Path &path); - Map *mMap; /**< The current map. */ + Map *mMap; /**< The current map. */ int mScrollRadius; int mScrollLaziness; int mScrollCenterOffsetX; int mScrollCenterOffsetY; - float mPixelViewX; /**< Current viewpoint in pixels. */ - float mPixelViewY; /**< Current viewpoint in pixels. */ + int mMouseX; /**< Current mouse position in pixels. */ + int mMouseY; /**< Current mouse position in pixels. */ + float mPixelViewX; /**< Current viewpoint in pixels. */ + float mPixelViewY; /**< Current viewpoint in pixels. */ int mTileViewX; /**< Current viewpoint in tiles. */ int mTileViewY; /**< Current viewpoint in tiles. */ - bool mShowDebugPath; /**< Show a path from player to pointer. */ - bool mVisibleNames; /**< Show target names. */ + bool mShowDebugPath; /**< Show a path from player to pointer. */ + bool mVisibleNames; /**< Show target names. */ bool mPlayerFollowMouse; #ifdef TMWSERV_SUPPORT @@ -160,11 +172,10 @@ class Viewport : public WindowContainer, public gcn::MouseListener, int mWalkTime; #endif - PopupMenu *mPopupMenu; /**< Popup menu. */ - Being *mSelectedBeing; /**< Current selected being. */ - + PopupMenu *mPopupMenu; /**< Popup menu. */ + Being *mSelectedBeing; /**< Current selected being. */ }; -extern Viewport *viewport; /**< The viewport */ +extern Viewport *viewport; /**< The viewport */ #endif |