summaryrefslogtreecommitdiff
path: root/src/gui/viewport.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 16:45:13 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 16:45:13 +0000
commitd1395845cdc678db2a71326f2e6f20253ed14cac (patch)
tree9a75fe0591fc7bd74f828aa048aa027f59a4ae66 /src/gui/viewport.h
parent6c3a2550813c14290307f2ad91e1d76eea3e6a02 (diff)
downloadmana-d1395845cdc678db2a71326f2e6f20253ed14cac.tar.gz
mana-d1395845cdc678db2a71326f2e6f20253ed14cac.tar.bz2
mana-d1395845cdc678db2a71326f2e6f20253ed14cac.tar.xz
mana-d1395845cdc678db2a71326f2e6f20253ed14cac.zip
Merged 0.0 changes from revision 2988 to 3035 to trunk.
Diffstat (limited to 'src/gui/viewport.h')
-rw-r--r--src/gui/viewport.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index df78b1da..80475fbf 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -79,31 +79,33 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
/**
* Toggles whether the path debug graphics are shown
*/
- void toggleDebugPath() { mShowDebugPath = !mShowDebugPath; }
+ void
+ toggleDebugPath() { mShowDebugPath = !mShowDebugPath; }
/**
* Handles mouse press on map.
*/
void
- mousePress(int mx, int my, int button);
+ mousePressed(gcn::MouseEvent &event);
/**
* Handles mouse move on map
*/
void
- mouseMotion(int mx, int my);
+ mouseMoved(gcn::MouseEvent &event);
/**
* Handles mouse button release on map.
*/
void
- mouseRelease(int mx, int my, int button);
+ mouseReleased(gcn::MouseEvent &event);
/**
* Shows a popup for an item.
* TODO Find some way to get rid of Item here
*/
- void showPopup(int x, int y, Item *item);
+ void
+ showPopup(int x, int y, Item *item);
/**
* A relevant config option changed.
@@ -111,6 +113,18 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
void
optionChanged(const std::string &name);
+ /**
+ * Returns camera x offset in tiles.
+ */
+ int
+ getCameraX() { return mCameraX; }
+
+ /**
+ * Returns camera y offset in tiles.
+ */
+ int
+ getCameraY() { return mCameraY; }
+
private:
/**
* Shows a popup for a floor item.
@@ -131,8 +145,8 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int mScrollLaziness;
float mViewX; /**< Current viewpoint in pixels. */
float mViewY; /**< Current viewpoint in pixels. */
- int mCameraX;
- int mCameraY;
+ int mCameraX; /**< Current viewpoint in tiles. */
+ int mCameraY; /**< Current viewpoint in tiles. */
bool mShowDebugPath; /**< Show a path from player to pointer. */
bool mPlayerFollowMouse;