summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index bb508184..5209d69b 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -21,6 +21,7 @@
#include "gui/npcdialog.h"
+#include "client.h"
#include "configuration.h"
#include "event.h"
#include "eventlistener.h"
@@ -399,6 +400,20 @@ void NpcDialog::event(Event::Channel channel, const Event &event)
}
}
+void NpcDialog::mouseClicked(gcn::MouseEvent &mouseEvent)
+{
+ if (mouseEvent.getSource() == mItemList &&
+ isDoubleClick(mItemList->getSelected()))
+ {
+ action(gcn::ActionEvent(mButton, mButton->getActionEventId()));
+ }
+ if (mouseEvent.getSource() == mTextBox && isDoubleClick((int)mTextBox))
+ {
+ if (mActionState == NPC_ACTION_NEXT || mActionState == NPC_ACTION_CLOSE)
+ action(gcn::ActionEvent(mButton, mButton->getActionEventId()));
+ }
+}
+
NpcDialog *NpcDialog::getActive()
{
if (instances.size() == 1)