mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Menus: Call SDL_Start/StopTextInput() at the appropriate times so that touch devices display the on-screen keyboard when the user is prompted for text input.
git-svn-id: https://svn.eduke32.com/eduke32@5170 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d313e2531a
commit
87ee51a248
1 changed files with 24 additions and 0 deletions
|
@ -3413,6 +3413,10 @@ void M_ChangeMenu(MenuID_t cm)
|
|||
{
|
||||
typebuf[0] = 0;
|
||||
((MenuTextForm_t*)m_currentMenu->object)->input = typebuf;
|
||||
|
||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||
SDL_StartTextInput();
|
||||
#endif
|
||||
}
|
||||
else if (m_currentMenu->type == FileSelect)
|
||||
M_MenuFileSelectInit((MenuFileSelect_t*)m_currentMenu->object);
|
||||
|
@ -5175,6 +5179,10 @@ static void M_RunMenuInput_MenuEntryString_Activate(MenuEntry_t *entry)
|
|||
object->maxlength = TYPEBUFSIZE;
|
||||
|
||||
M_MenuEntryStringActivate(/*entry*/);
|
||||
|
||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||
SDL_StartTextInput();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void M_RunMenuInput_MenuEntryString_Submit(MenuEntry_t *entry, MenuString_t *object)
|
||||
|
@ -5183,6 +5191,10 @@ static void M_RunMenuInput_MenuEntryString_Submit(MenuEntry_t *entry, MenuString
|
|||
Bstrncpy(object->variable, object->editfield, object->maxlength);
|
||||
|
||||
object->editfield = NULL;
|
||||
|
||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||
SDL_StopTextInput();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void M_RunMenuInput_MenuEntryString_Cancel(/*MenuEntry_t *entry, */MenuString_t *object)
|
||||
|
@ -5190,6 +5202,10 @@ static void M_RunMenuInput_MenuEntryString_Cancel(/*MenuEntry_t *entry, */MenuSt
|
|||
M_MenuEntryStringCancel(/*entry*/);
|
||||
|
||||
object->editfield = NULL;
|
||||
|
||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||
SDL_StopTextInput();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void M_RunMenuInput_FileSelect_MovementVerify(MenuFileSelect_t *object)
|
||||
|
@ -5313,6 +5329,10 @@ static void M_RunMenuInput(Menu_t *cm)
|
|||
object->input = NULL;
|
||||
|
||||
M_ChangeMenuAnimate(cm->parentID, cm->parentAnimation);
|
||||
|
||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||
SDL_StopTextInput();
|
||||
#endif
|
||||
}
|
||||
else if (hitstate == 1 || M_RunMenuInput_MouseAdvance())
|
||||
{
|
||||
|
@ -5321,6 +5341,10 @@ static void M_RunMenuInput(Menu_t *cm)
|
|||
M_MenuTextFormSubmit(object->input);
|
||||
|
||||
object->input = NULL;
|
||||
|
||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||
SDL_StopTextInput();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue