From d21513f3d6c7b5263ee50f1969d89293b2041b59 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Jul 2012 13:12:01 +0300 Subject: Remove emote popup window. --- src/gui/windowmenu.cpp | 48 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 42 deletions(-) (limited to 'src/gui/windowmenu.cpp') 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) -- cgit v1.2.3-60-g2f50