diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-14 17:14:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-14 17:14:34 +0300 |
commit | e8f38bb21acdade340979f51871513845a3d8a4f (patch) | |
tree | cfedb01e12b470f3aca3720598bbe8c1529a0ee6 /src | |
parent | 07a59c56ff9546efde336ece9de8e939cb554f5b (diff) | |
download | manaplus-e8f38bb21acdade340979f51871513845a3d8a4f.tar.gz manaplus-e8f38bb21acdade340979f51871513845a3d8a4f.tar.bz2 manaplus-e8f38bb21acdade340979f51871513845a3d8a4f.tar.xz manaplus-e8f38bb21acdade340979f51871513845a3d8a4f.zip |
Use CREATEWIDGET macro in windowmanager.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windowmanager.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 902acb60d..6f1f223bc 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -43,6 +43,7 @@ #include "gui/windows/helpwindow.h" #include "gui/windows/setupwindow.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/desktop.h" #include "utils/delete2.h" @@ -94,24 +95,15 @@ void WindowManager::init() void WindowManager::createWindows() { userPalette = new UserPalette; - setupWindow = new SetupWindow; - setupWindow->postInit(); - helpWindow = new HelpWindow; - helpWindow->postInit(); - didYouKnowWindow = new DidYouKnowWindow; - didYouKnowWindow->postInit(); - popupMenu = new PopupMenu; - popupMenu->postInit(); - beingPopup = new BeingPopup; - beingPopup->postInit(); - textPopup = new TextPopup; - textPopup->postInit(); - textBoxPopup = new TextBoxPopup; - textBoxPopup->postInit(); - itemPopup = new ItemPopup; - itemPopup->postInit(); - spellPopup = new SpellPopup; - spellPopup->postInit(); + CREATEWIDGET1(setupWindow, SetupWindow); + CREATEWIDGET1(helpWindow, HelpWindow); + CREATEWIDGET1(didYouKnowWindow, DidYouKnowWindow); + CREATEWIDGET1(popupMenu, PopupMenu); + CREATEWIDGET1(beingPopup, BeingPopup); + CREATEWIDGET1(textPopup, TextPopup); + CREATEWIDGET1(textBoxPopup, TextBoxPopup); + CREATEWIDGET1(itemPopup, ItemPopup); + CREATEWIDGET1(spellPopup, SpellPopup); } void WindowManager::deleteWindows() |