From 29402e0b1833dfc19fb646e2b7541a401ff9ffe8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Aug 2014 16:02:56 +0300 Subject: Create public variable for spellpopup. --- src/gui/popups/spellpopup.cpp | 2 ++ src/gui/popups/spellpopup.h | 2 ++ src/gui/windowmanager.cpp | 4 ++++ 3 files changed, 8 insertions(+) (limited to 'src/gui') diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp index e8bfee72d..eb82a637d 100644 --- a/src/gui/popups/spellpopup.cpp +++ b/src/gui/popups/spellpopup.cpp @@ -31,6 +31,8 @@ #include "debug.h" +SpellPopup *spellPopup = nullptr; + SpellPopup::SpellPopup() : Popup("SpellPopup", "spellpopup.xml"), mItemName(new Label(this)), diff --git a/src/gui/popups/spellpopup.h b/src/gui/popups/spellpopup.h index 0352161fc..7db1dcf2b 100644 --- a/src/gui/popups/spellpopup.h +++ b/src/gui/popups/spellpopup.h @@ -67,4 +67,6 @@ class SpellPopup final : public Popup Label *mItemComment; }; +extern SpellPopup *spellPopup; + #endif // GUI_POPUPS_SPELLPOPUP_H diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 9b359f12a..de8f57a62 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -35,6 +35,7 @@ #include "gui/popups/beingpopup.h" #include "gui/popups/itempopup.h" #include "gui/popups/popupmenu.h" +#include "gui/popups/spellpopup.h" #include "gui/popups/textpopup.h" #include "gui/windows/didyouknowwindow.h" @@ -106,6 +107,8 @@ void WindowManager::createWindows() textPopup->postInit(); itemPopup = new ItemPopup; itemPopup->postInit(); + spellPopup = new SpellPopup; + spellPopup->postInit(); } void WindowManager::deleteWindows() @@ -113,6 +116,7 @@ void WindowManager::deleteWindows() delete2(textPopup); delete2(beingPopup); delete2(itemPopup); + delete2(spellPopup); delete2(popupMenu); delete2(commandHandler); delete2(didYouKnowWindow); -- cgit v1.2.3-70-g09d2