1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
This commit is contained in:
siliconsniffer 2025-06-24 15:36:26 +02:00 committed by GitHub
commit e86e2ad38c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -246,8 +246,9 @@ bool GUIModalMenu::preprocessEvent(const SEvent &event)
#ifdef __ANDROID__
// display software keyboard when clicking edit boxes
if (event.EventType == EET_MOUSE_INPUT_EVENT &&
event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN &&
!porting::hasPhysicalKeyboardAndroid()) {
((event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN &&
!porting::hasPhysicalKeyboardAndroid()) ||
event.MouseInput.Event == EMIE_LMOUSE_DOUBLE_CLICK)) {
gui::IGUIElement *hovered =
Environment->getRootGUIElement()->getElementFromPoint(
core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y));
@ -276,7 +277,9 @@ bool GUIModalMenu::preprocessEvent(const SEvent &event)
porting::showTextInputDialog("",
wide_to_utf8(((gui::IGUIEditBox *) hovered)->getText()), type);
return retval;
// Since we have opened the dialog, we have to return true to mark
// the event as handled (avoids double-opening).
return true;
}
}