summaryrefslogtreecommitdiff
path: root/src/gui/widgets/characterdisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/characterdisplay.cpp')
-rw-r--r--src/gui/widgets/characterdisplay.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index dba6be286..1815ec395 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -42,6 +42,8 @@ CharacterDisplay::CharacterDisplay(const Widget2 *const widget,
{
mPlayerBox->setActionEventId("select");
mPlayerBox->addActionListener(charSelectDialog);
+ setActionEventId("use");
+ addActionListener(charSelectDialog);
LayoutHelper h(this);
ContainerPlacer placer = h.getPlacer(0, 0);
@@ -114,3 +116,9 @@ void CharacterDisplay::mouseMoved(gcn::MouseEvent &event)
SDL_GetMouseState(&mouseX, &mouseY);
mPopup->show(mouseX, mouseY, mName->getCaption());
}
+
+void CharacterDisplay::mousePressed(gcn::MouseEvent &event)
+{
+ if (event.getClickCount() == 2)
+ distributeActionEvent();
+}