From b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Sep 2012 22:09:11 +0300 Subject: Improve constructors in some classes. --- src/gui/viewport.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gui/viewport.cpp') 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); } -- cgit v1.2.3-70-g09d2