mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Menus: Mostly revert r5326, and instead restrict the starting and stopping text input to touch devices where we need the on-screen keyboard to appear. This maintains the bugfix on targets with a physical keyboard.
git-svn-id: https://svn.eduke32.com/eduke32@5331 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bb4977cc9f
commit
2303da6d7c
1 changed files with 10 additions and 6 deletions
|
@ -59,21 +59,19 @@ extern int32_t voting;
|
||||||
|
|
||||||
#define USERMAPENTRYLENGTH 25
|
#define USERMAPENTRYLENGTH 25
|
||||||
|
|
||||||
#if 0
|
FORCE_INLINE void WithSDL2_StartTextInput()
|
||||||
static inline void WithSDL2_StartTextInput()
|
|
||||||
{
|
{
|
||||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
#if defined EDUKE32_TOUCH_DEVICES && defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void WithSDL2_StopTextInput()
|
FORCE_INLINE void WithSDL2_StopTextInput()
|
||||||
{
|
{
|
||||||
#if defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
#if defined EDUKE32_TOUCH_DEVICES && defined SDL_MAJOR_VERSION && SDL_MAJOR_VERSION > 1
|
||||||
SDL_StopTextInput();
|
SDL_StopTextInput();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#define mgametext(x,y,t) G_ScreenText(STARTALPHANUM, x, y, 65536, 0, 0, t, 0, 0, 2|8|16|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, -1<<16, 0, 0, 0, 0, xdim-1, ydim-1)
|
#define mgametext(x,y,t) G_ScreenText(STARTALPHANUM, x, y, 65536, 0, 0, t, 0, 0, 2|8|16|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, -1<<16, 0, 0, 0, 0, xdim-1, ydim-1)
|
||||||
#define mgametextcenter(x,y,t) G_ScreenText(STARTALPHANUM, (MENU_MARGIN_CENTER<<16) + (x), y, 65536, 0, 0, t, 0, 0, 2|8|16|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, -1<<16, 1<<16, TEXT_XCENTER, 0, 0, xdim-1, ydim-1)
|
#define mgametextcenter(x,y,t) G_ScreenText(STARTALPHANUM, (MENU_MARGIN_CENTER<<16) + (x), y, 65536, 0, 0, t, 0, 0, 2|8|16|ROTATESPRITE_FULL16, 0, 5<<16, 8<<16, -1<<16, 1<<16, TEXT_XCENTER, 0, 0, xdim-1, ydim-1)
|
||||||
|
@ -3418,6 +3416,7 @@ void M_ChangeMenu(MenuID_t cm)
|
||||||
{
|
{
|
||||||
typebuf[0] = 0;
|
typebuf[0] = 0;
|
||||||
((MenuTextForm_t*)m_currentMenu->object)->input = typebuf;
|
((MenuTextForm_t*)m_currentMenu->object)->input = typebuf;
|
||||||
|
WithSDL2_StartTextInput();
|
||||||
}
|
}
|
||||||
else if (m_currentMenu->type == FileSelect)
|
else if (m_currentMenu->type == FileSelect)
|
||||||
M_MenuFileSelectInit((MenuFileSelect_t*)m_currentMenu->object);
|
M_MenuFileSelectInit((MenuFileSelect_t*)m_currentMenu->object);
|
||||||
|
@ -5180,6 +5179,7 @@ static void M_RunMenuInput_MenuEntryString_Activate(MenuEntry_t *entry)
|
||||||
object->maxlength = TYPEBUFSIZE;
|
object->maxlength = TYPEBUFSIZE;
|
||||||
|
|
||||||
M_MenuEntryStringActivate(/*entry*/);
|
M_MenuEntryStringActivate(/*entry*/);
|
||||||
|
WithSDL2_StartTextInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_RunMenuInput_MenuEntryString_Submit(MenuEntry_t *entry, MenuString_t *object)
|
static void M_RunMenuInput_MenuEntryString_Submit(MenuEntry_t *entry, MenuString_t *object)
|
||||||
|
@ -5188,6 +5188,7 @@ static void M_RunMenuInput_MenuEntryString_Submit(MenuEntry_t *entry, MenuString
|
||||||
Bstrncpy(object->variable, object->editfield, object->maxlength);
|
Bstrncpy(object->variable, object->editfield, object->maxlength);
|
||||||
|
|
||||||
object->editfield = NULL;
|
object->editfield = NULL;
|
||||||
|
WithSDL2_StopTextInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_RunMenuInput_MenuEntryString_Cancel(/*MenuEntry_t *entry, */MenuString_t *object)
|
static void M_RunMenuInput_MenuEntryString_Cancel(/*MenuEntry_t *entry, */MenuString_t *object)
|
||||||
|
@ -5195,6 +5196,7 @@ static void M_RunMenuInput_MenuEntryString_Cancel(/*MenuEntry_t *entry, */MenuSt
|
||||||
M_MenuEntryStringCancel(/*entry*/);
|
M_MenuEntryStringCancel(/*entry*/);
|
||||||
|
|
||||||
object->editfield = NULL;
|
object->editfield = NULL;
|
||||||
|
WithSDL2_StopTextInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_RunMenuInput_FileSelect_MovementVerify(MenuFileSelect_t *object)
|
static void M_RunMenuInput_FileSelect_MovementVerify(MenuFileSelect_t *object)
|
||||||
|
@ -5318,6 +5320,7 @@ static void M_RunMenuInput(Menu_t *cm)
|
||||||
object->input = NULL;
|
object->input = NULL;
|
||||||
|
|
||||||
M_ChangeMenuAnimate(cm->parentID, cm->parentAnimation);
|
M_ChangeMenuAnimate(cm->parentID, cm->parentAnimation);
|
||||||
|
WithSDL2_StopTextInput();
|
||||||
}
|
}
|
||||||
else if (hitstate == 1 || M_RunMenuInput_MouseAdvance())
|
else if (hitstate == 1 || M_RunMenuInput_MouseAdvance())
|
||||||
{
|
{
|
||||||
|
@ -5326,6 +5329,7 @@ static void M_RunMenuInput(Menu_t *cm)
|
||||||
M_MenuTextFormSubmit(object->input);
|
M_MenuTextFormSubmit(object->input);
|
||||||
|
|
||||||
object->input = NULL;
|
object->input = NULL;
|
||||||
|
WithSDL2_StopTextInput();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue