summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-31 23:20:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-31 23:20:54 +0300
commit33ef923235aeabd07308816bb07ef790cc6c1024 (patch)
treee50c8bbefae98bc57e5b804ba145bca2005c5ca7 /src/gui/widgets/avatarlistbox.cpp
parentb6bd4b5d68df33d12f18a67de2e54e016a0935fe (diff)
downloadmv-33ef923235aeabd07308816bb07ef790cc6c1024.tar.gz
mv-33ef923235aeabd07308816bb07ef790cc6c1024.tar.bz2
mv-33ef923235aeabd07308816bb07ef790cc6c1024.tar.xz
mv-33ef923235aeabd07308816bb07ef790cc6c1024.zip
Move popup related code from viewport into popupManager.
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 80bcba94c..6369efce8 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -28,6 +28,7 @@
#include "being/localplayer.h"
#include "gui/gui.h"
+#include "gui/popupmanager.h"
#include "gui/skin.h"
#include "gui/viewport.h"
@@ -335,7 +336,7 @@ void AvatarListBox::draw(Graphics *graphics)
void AvatarListBox::mousePressed(MouseEvent &event)
{
- if (!actorManager || !localPlayer || !viewport
+ if (!actorManager || !localPlayer || !popupManager
|| !getFont()->getHeight())
{
return;
@@ -385,9 +386,9 @@ void AvatarListBox::mousePressed(MouseEvent &event)
const Being *const being = actorManager->findBeingByName(
avatar->getName(), ActorType::PLAYER);
if (being)
- viewport->showPopup(being);
+ popupManager->showPopup(being);
else
- viewport->showPlayerPopup(avatar->getName());
+ popupManager->showPlayerPopup(avatar->getName());
}
break;
}
@@ -401,7 +402,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
else
name = model->getAvatarAt(selected)->getName();
- viewport->showAttackMonsterPopup(name,
+ popupManager->showAttackMonsterPopup(name,
model->getAvatarAt(selected)->getType());
break;
}
@@ -414,7 +415,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
else
name = model->getAvatarAt(selected)->getName();
- viewport->showPickupItemPopup(name);
+ popupManager->showPickupItemPopup(name);
break;
}
default:
@@ -425,7 +426,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
{
MapItem *const mapItem = map->findPortalXY(
ava->getX(), ava->getY());
- viewport->showPopup(mapItem);
+ popupManager->showPopup(mapItem);
}
break;
}