diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-02 13:42:14 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-02 13:42:14 +0000 |
commit | 0c8c8cf7ea63def0d454f30227584a5f3062c013 (patch) | |
tree | 9929ddd6c0ecaffef0d75411eeaea2f9fa7fbdfd /src/gui/viewport.h | |
parent | 4ff5c3b854215b1f55e70106a4c53225fc953619 (diff) | |
download | mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.tar.gz mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.tar.bz2 mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.tar.xz mana-0c8c8cf7ea63def0d454f30227584a5f3062c013.zip |
Revert "Merge WindowContainer into Viewport and remove extra members"
This reverts commit 67e678094b9fddd21fb3c690130e772937ab2746.
Conflicts:
src/gui/gui.cpp
src/gui/viewport.cpp
Diffstat (limited to 'src/gui/viewport.h')
-rw-r--r-- | src/gui/viewport.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 196070f1..3fab607d 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -25,7 +25,7 @@ #include "configlistener.h" #include "position.h" -#include "gui/widgets/container.h" +#include "gui/widgets/windowcontainer.h" #include <guichan/mouselistener.hpp> @@ -50,7 +50,7 @@ const int walkingMouseDelay = 500; * of it such as NPC messages, which are positioned using map pixel * coordinates. */ -class Viewport : public Container, public gcn::MouseListener, +class Viewport : public WindowContainer, public gcn::MouseListener, public ConfigListener { public: @@ -157,12 +157,6 @@ class Viewport : public Container, public gcn::MouseListener, */ void hideBeingPopup(); - /** - * Schedule a widget for deletion. It will be deleted at the start of - * the next logic update. - */ - void scheduleDelete(gcn::Widget *widget); - private: /** * Finds a path from the player to the mouse, and draws it. This is for @@ -180,13 +174,6 @@ class Viewport : public Container, public gcn::MouseListener, */ void _followMouse(); - /** - * List of widgets that are scheduled to be deleted. - */ - typedef std::list<gcn::Widget*> Widgets; - typedef Widgets::iterator WidgetIterator; - Widgets mDeathList; - Map *mMap; /**< The current map. */ int mScrollRadius; @@ -197,7 +184,10 @@ class Viewport : public Container, public gcn::MouseListener, 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. */ int mShowDebugPath; /**< Show a path from player to pointer. */ + bool mVisibleNames; /**< Show target names. */ bool mPlayerFollowMouse; @@ -206,9 +196,9 @@ class Viewport : public Container, public gcn::MouseListener, PopupMenu *mPopupMenu; /**< Popup menu. */ Being *mHoverBeing; /**< Being mouse is currently over. */ FloorItem *mHoverItem; /**< FloorItem mouse is currently over. */ - BeingPopup *mBeingPopup; /**< Being information popup. */ + BeingPopup *mBeingPopup; }; -extern Viewport *viewport; /**< The viewport. */ +extern Viewport *viewport; /**< The viewport */ #endif |