mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Merge 70f10f2084
into 0794145b64
This commit is contained in:
commit
e86e2ad38c
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue