diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-18 13:29:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-19 15:12:20 +0300 |
commit | e994c01cab6fc45e54396641c5fd9fa509cfe0d6 (patch) | |
tree | 8fe8f322c8a8d7f6ecdab5796ab9ca1dbb1a3e82 /src | |
parent | 0e6d3cb3cd1fca213ff5a6201b4c3da9b0c3b49e (diff) | |
download | manaplus-e994c01cab6fc45e54396641c5fd9fa509cfe0d6.tar.gz manaplus-e994c01cab6fc45e54396641c5fd9fa509cfe0d6.tar.bz2 manaplus-e994c01cab6fc45e54396641c5fd9fa509cfe0d6.tar.xz manaplus-e994c01cab6fc45e54396641c5fd9fa509cfe0d6.zip |
move virtual member calls from gui constuctor into postInit.
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 3 | ||||
-rw-r--r-- | src/gui/gui.cpp | 6 | ||||
-rw-r--r-- | src/gui/gui.h | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index 9a19c0edc..b5c2e1829 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -637,7 +637,8 @@ void Client::gameInit() emoteShortcut = new EmoteShortcut; dropShortcut = new DropShortcut; - gui = new Gui(mainGraphics); + gui = new Gui(); + gui->postInit(mainGraphics); // Initialize sound engine try diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 18cc061b2..d32e81fe8 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -82,7 +82,7 @@ class GuiConfigListener final : public ConfigListener Gui *mGui; }; -Gui::Gui(Graphics *const graphics) : +Gui::Gui() : gcn::Gui(), mConfigListener(new GuiConfigListener(this)), mGuiFont(), @@ -104,6 +104,10 @@ Gui::Gui(Graphics *const graphics) : mCustomCursor(false), mDoubleClick(true) { +} + +void Gui::postInit(Graphics *const graphics) +{ logger->log1("Initializing GUI..."); // Set graphics setGraphics(graphics); diff --git a/src/gui/gui.h b/src/gui/gui.h index e82587623..85ec33415 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -56,7 +56,7 @@ class Gui final : public gcn::Gui /** * Constructor. */ - explicit Gui(Graphics *const screen); + Gui(); A_DELETE_COPY(Gui) @@ -65,6 +65,8 @@ class Gui final : public gcn::Gui */ ~Gui(); + void postInit(Graphics *const graphics); + /** * Performs logic of the GUI. Overridden to track mouse pointer * activity. |