diff options
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 260b0fe57..3a6212b79 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -27,6 +27,7 @@ #include "keyevent.h" #include "gui/sdlinput.h" +#include "gui/viewport.h" #include "resources/image.h" @@ -515,3 +516,13 @@ void TextField::fontChanged() { fixScroll(); } + +void TextField::mousePressed(gcn::MouseEvent &mouseEvent) +{ + if (mouseEvent.getButton() == gcn::MouseEvent::RIGHT) + { + if (viewport) + viewport->showTextFieldPopup(this); + } + else gcn::TextField::mousePressed(mouseEvent); +} |