mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +01:00
Fix issues with hotkey during text inputs.
This commit is contained in:
parent
76b326aac3
commit
2ddd7a96fb
2 changed files with 8 additions and 1 deletions
|
@ -79,6 +79,7 @@ void KeyPoll::disabletextentry()
|
|||
|
||||
void KeyPoll::Poll()
|
||||
{
|
||||
bool modifierPressed = false;
|
||||
SDL_Event evt;
|
||||
while (SDL_PollEvent(&evt))
|
||||
{
|
||||
|
@ -94,6 +95,8 @@ void KeyPoll::Poll()
|
|||
pressedbackspace = true;
|
||||
}
|
||||
|
||||
modifierPressed = keymap[SDLK_LCTRL] || keymap[SDLK_RCTRL] || keymap[SDLK_LALT] || keymap[SDLK_RALT] || keymap[SDLK_LGUI] || keymap[SDLK_RGUI];
|
||||
|
||||
#ifdef __APPLE__ /* OSX prefers the command keys over the alt keys. -flibit */
|
||||
bool altpressed = keymap[SDLK_LGUI] || keymap[SDLK_RGUI];
|
||||
#else
|
||||
|
@ -135,7 +138,10 @@ void KeyPoll::Poll()
|
|||
}
|
||||
break;
|
||||
case SDL_TEXTINPUT:
|
||||
keybuffer += evt.text.text;
|
||||
if (!modifierPressed)
|
||||
{
|
||||
keybuffer += evt.text.text;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Mouse Input */
|
||||
|
|
|
@ -495,6 +495,7 @@ void editorclass::getlin(const enum textmode mode, const std::string& prompt, st
|
|||
ed.textmod = mode;
|
||||
ed.textptr = ptr;
|
||||
ed.textdesc = prompt;
|
||||
ed.textentry = true;
|
||||
key.enabletextentry();
|
||||
if (ptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue