summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r--src/gui/widgets/textfield.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index adb455432..0810b9395 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -70,14 +70,16 @@
#include "input/inputmanager.h"
#include "gui/gui.h"
-#include "gui/popupmanager.h"
#include "gui/skin.h"
+#include "gui/viewport.h"
#ifdef ANDROID
#include "gui/windowmanager.h"
#endif
#include "gui/fonts/font.h"
+#include "gui/popups/popupmenu.h"
+
#include "resources/image.h"
#include "resources/imagerect.h"
@@ -703,8 +705,12 @@ void TextField::mousePressed(MouseEvent &event)
event.consume();
if (event.getButton() == MouseButton::RIGHT)
{
- if (popupManager)
- popupManager->showTextFieldPopup(this);
+ if (popupMenu)
+ {
+ popupMenu->showTextFieldPopup(viewport->getMouseX(),
+ viewport->getMouseY(),
+ this);
+ }
}
else if (event.getButton() == MouseButton::LEFT)
{