diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/viewport.cpp | 5 | ||||
-rw-r--r-- | src/gui/viewport.h | 2 | ||||
-rw-r--r-- | src/gui/whoisonline.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 15353d9f9..0fc7444ec 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -630,6 +630,11 @@ void Viewport::showPopup(int x, int y, Being *being) mPopupMenu->showPopup(x, y, being); } +void Viewport::showPopup(Being *being) +{ + mPopupMenu->showPopup(getMouseX(), getMouseY(), being); +} + void Viewport::showPlayerPopup(std::string nick) { mPopupMenu->showPlayerPopup(getMouseX(), getMouseY(), nick); diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 52a3257f5..774392cc0 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -152,6 +152,8 @@ class Viewport : public WindowContainer, public gcn::MouseListener, */ void showPopup(int x, int y, Being *being); + void showPopup(Being *being); + void showPlayerPopup(std::string nick); void showOutfitsPopup(int x, int y); diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index 73b6e2e8c..9c1a71478 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -164,7 +164,7 @@ void WhoIsOnline::handleLink(const std::string& link, gcn::MouseEvent *event) if (being && viewport) { - viewport->showPopup(event->getX(), event->getY(), being); + viewport->showPopup(being); return; } } diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index a7331ae78..1c1c83ec8 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -324,7 +324,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event) model->getAvatarAt(selected)->getName(), Being::PLAYER); if (being) { - viewport->showPopup(event.getX(), event.getY(), being); + viewport->showPopup(being); } else { |