summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-07 22:09:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-07 22:09:11 +0300
commitb7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (patch)
treeee27a5a1ace7e5dbc588466dc623013e4d5cea99 /src/gui/viewport.cpp
parent7d3059516fc25134d0d29b497e546f2846162399 (diff)
downloadmv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz
mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2
mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz
mv-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip
Improve constructors in some classes.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 34c10f891..b9abb4952 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -54,7 +54,9 @@
extern volatile int tick_time;
-Viewport::Viewport():
+Viewport::Viewport() :
+ WindowContainer(),
+ MouseListener(),
mMap(nullptr),
mMouseX(0),
mMouseY(0),
@@ -64,9 +66,12 @@ Viewport::Viewport():
mCameraMode(0),
mPlayerFollowMouse(false),
mLocalWalkTime(-1),
+ mPopupMenu(new PopupMenu),
mHoverBeing(nullptr),
mHoverItem(nullptr),
mHoverSign(nullptr),
+ mBeingPopup(new BeingPopup),
+ mTextPopup(new TextPopup),
mCameraRelativeX(0),
mCameraRelativeY(0)
{
@@ -87,10 +92,6 @@ Viewport::Viewport():
config.addListener("selfMouseHeal", this);
config.addListener("enableLazyScrolling", this);
- mPopupMenu = new PopupMenu;
- mBeingPopup = new BeingPopup;
- mTextPopup = new TextPopup;
-
setFocusable(true);
}