mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Input: Separate everything in AdvanceTrigger into a new TextSubmit except Space so it doesn't submit text fields such as savegames
git-svn-id: https://svn.eduke32.com/eduke32@8025 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
757b19ad3f
commit
673bd16299
1 changed files with 17 additions and 6 deletions
|
@ -54,12 +54,11 @@ void I_ClearAllInput(void)
|
|||
}
|
||||
|
||||
|
||||
int32_t I_AdvanceTrigger(void)
|
||||
int32_t I_TextSubmit(void)
|
||||
{
|
||||
return
|
||||
KB_KeyPressed(sc_Enter)
|
||||
|| KB_KeyPressed(sc_kpad_Enter)
|
||||
|| KB_KeyPressed(sc_Space)
|
||||
#if !defined EDUKE32_TOUCH_DEVICES
|
||||
|| MOUSEINACTIVECONDITIONAL(MOUSE_GetButtons()&LEFT_MOUSE)
|
||||
#endif
|
||||
|
@ -70,10 +69,9 @@ int32_t I_AdvanceTrigger(void)
|
|||
;
|
||||
}
|
||||
|
||||
void I_AdvanceTriggerClear(void)
|
||||
void I_TextSubmitClear(void)
|
||||
{
|
||||
KB_FlushKeyboardQueue();
|
||||
KB_ClearKeyDown(sc_Space);
|
||||
KB_ClearKeyDown(sc_kpad_Enter);
|
||||
KB_ClearKeyDown(sc_Enter);
|
||||
MOUSE_ClearButton(LEFT_MOUSE);
|
||||
|
@ -83,6 +81,19 @@ void I_AdvanceTriggerClear(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
int32_t I_AdvanceTrigger(void)
|
||||
{
|
||||
return
|
||||
I_TextSubmit()
|
||||
|| KB_KeyPressed(sc_Space);
|
||||
}
|
||||
|
||||
void I_AdvanceTriggerClear(void)
|
||||
{
|
||||
I_TextSubmitClear();
|
||||
KB_ClearKeyDown(sc_Space);
|
||||
}
|
||||
|
||||
int32_t I_ReturnTrigger(void)
|
||||
{
|
||||
return
|
||||
|
@ -377,9 +388,9 @@ int32_t I_EnterText(char *t, int32_t maxlength, int32_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
if (I_AdvanceTrigger())
|
||||
if (I_TextSubmit())
|
||||
{
|
||||
I_AdvanceTriggerClear();
|
||||
I_TextSubmitClear();
|
||||
return 1;
|
||||
}
|
||||
if (I_ReturnTrigger())
|
||||
|
|
Loading…
Reference in a new issue