From 0c8c8cf7ea63def0d454f30227584a5f3062c013 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 2 Mar 2010 13:42:14 +0000 Subject: Revert "Merge WindowContainer into Viewport and remove extra members" This reverts commit 67e678094b9fddd21fb3c690130e772937ab2746. Conflicts: src/gui/gui.cpp src/gui/viewport.cpp --- src/gui/viewport.h | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'src/gui/viewport.h') 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 @@ -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 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 -- cgit v1.2.3-70-g09d2