diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-15 13:12:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-15 13:12:01 +0300 |
commit | d21513f3d6c7b5263ee50f1969d89293b2041b59 (patch) | |
tree | dc16f7e04d76c5358a32e5bc58bf911311ddc2ec /src/gui/windowmenu.cpp | |
parent | 89738ae875a05824b261864b6f7f108c41e48e93 (diff) | |
download | plus-d21513f3d6c7b5263ee50f1969d89293b2041b59.tar.gz plus-d21513f3d6c7b5263ee50f1969d89293b2041b59.tar.bz2 plus-d21513f3d6c7b5263ee50f1969d89293b2041b59.tar.xz plus-d21513f3d6c7b5263ee50f1969d89293b2041b59.zip |
Remove emote popup window.
Diffstat (limited to 'src/gui/windowmenu.cpp')
-rw-r--r-- | src/gui/windowmenu.cpp | 48 |
1 files changed, 6 insertions, 42 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index 7ecb8e2fa..37490eea7 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -28,7 +28,6 @@ #include "keyboardconfig.h" #include "gui/didyouknowwindow.h" -#include "gui/emotepopup.h" #include "gui/skilldialog.h" #ifdef MANASERV_SUPPORT #include "gui/specialswindow.h" @@ -48,6 +47,7 @@ #include "debug.h" +extern Window *emoteShortcutWindow; extern Window *equipmentWindow; extern Window *inventoryWindow; extern Window *itemShortcutWindow; @@ -60,8 +60,7 @@ extern Window *spellShortcutWindow; extern Window *botCheckerWindow; extern Window *socialWindow; -WindowMenu::WindowMenu(): - mEmotePopup(nullptr), +WindowMenu::WindowMenu() : mHaveMouse(false), mAutoHide(1) { @@ -148,32 +147,7 @@ void WindowMenu::action(const gcn::ActionEvent &event) if (event.getId() == ":-)") { - if (!mEmotePopup) - { - const gcn::Widget *s = event.getSource(); - if (s) - { - const gcn::Rectangle &r = s->getDimension(); - const int parentX = s->getParent()->getX(); - - mEmotePopup = new EmotePopup; - const int offset = (r.width - mEmotePopup->getWidth()) / 2; - mEmotePopup->setPosition(parentX + r.x + offset, - r.y + r.height + 5); - - mEmotePopup->addSelectionListener(this); - } - else - { - mEmotePopup = nullptr; - } - } - else - { - if (windowContainer) - windowContainer->scheduleDelete(mEmotePopup); - mEmotePopup = nullptr; - } + window = emoteShortcutWindow; } else if (event.getId() == "STA") { @@ -242,19 +216,9 @@ void WindowMenu::action(const gcn::ActionEvent &event) } } -void WindowMenu::valueChanged(const gcn::SelectionEvent &event) -{ - if (event.getSource() == mEmotePopup) - { - int emote = mEmotePopup->getSelectedEmote(); - if (emote && emoteShortcut) - emoteShortcut->useEmote(emote); - - if (windowContainer) - windowContainer->scheduleDelete(mEmotePopup); - mEmotePopup = nullptr; - } -} +//void WindowMenu::valueChanged(const gcn::SelectionEvent &event) +//{ +//} void WindowMenu::addButton(const char* text, std::string description, int &x, int &h, int key, bool visible) |