diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-17 13:40:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-17 13:40:14 +0300 |
commit | 2cb9f5c3d47077a459fabf15800b1c45cfdacb3a (patch) | |
tree | ad6eba1142495acd31dc8a50b56988a26350f2d5 /src/gui/widgets/avatarlistbox.cpp | |
parent | 829cd57e021ea85cffdbd3f3a7b18da835e00b7c (diff) | |
download | plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.tar.gz plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.tar.bz2 plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.tar.xz plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.zip |
Remove proxy methods used for access popup menu.
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 4968393b2..21689311a 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -34,6 +34,8 @@ #include "gui/fonts/font.h" +#include "gui/popups/popupmenu.h" + #include "gui/models/avatarlistmodel.h" #include "gui/windows/chatwindow.h" @@ -392,9 +394,17 @@ void AvatarListBox::mousePressed(MouseEvent &event) const Being *const being = actorManager->findBeingByName( avatar->getName(), ActorType::PLAYER); if (being) - popupManager->showPopup(being); + { + popupMenu->showPopup(viewport->getMouseX(), + viewport->getMouseY(), + being); + } else - popupManager->showPlayerPopup(avatar->getName()); + { + popupMenu->showPlayerPopup(viewport->getMouseX(), + viewport->getMouseY(), + avatar->getName()); + } } break; } @@ -408,7 +418,9 @@ void AvatarListBox::mousePressed(MouseEvent &event) else name = model->getAvatarAt(selected)->getName(); - popupManager->showAttackMonsterPopup(name, + popupMenu->showAttackMonsterPopup(viewport->getMouseX(), + viewport->getMouseY(), + name, static_cast<ActorType::Type>(model->getAvatarAt( selected)->getType())); break; @@ -422,7 +434,9 @@ void AvatarListBox::mousePressed(MouseEvent &event) else name = model->getAvatarAt(selected)->getName(); - popupManager->showPickupItemPopup(name); + popupMenu->showPickupItemPopup(viewport->getMouseX(), + viewport->getMouseY(), + name); break; } case MapItemType::HOME: @@ -446,7 +460,9 @@ void AvatarListBox::mousePressed(MouseEvent &event) { MapItem *const mapItem = map->findPortalXY( ava->getX(), ava->getY()); - popupManager->showPopup(mapItem); + popupMenu->showPopup(viewport->getMouseX(), + viewport->getMouseY(), + mapItem); } break; } |