mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
fix bug with SDL text input that occurs when multiple responders occur on the screen. (Tested with 2 responders.)
This commit is contained in:
parent
f6b8ef126d
commit
3ecbb4b7e5
3 changed files with 31 additions and 1 deletions
|
|
@ -486,6 +486,19 @@ void PlatformWindowSDL::_triggerKeyNotify(const SDL_Event& evt)
|
|||
{
|
||||
keyEvent.trigger(getWindowId(), torqueModifiers, inputAction, torqueKey);
|
||||
//Con::printf("Key %d : %d", tKey.sym, inputAction);
|
||||
|
||||
if (inputAction == IA_MAKE && SDL_IsTextInputActive())
|
||||
{
|
||||
// We have to check if we already have a first responder active.
|
||||
// We don't want to type the character if it actually creates another responder!
|
||||
if (mWindowInputGenerator->lastKeyWasGlobalActionMap())
|
||||
{
|
||||
// Turn off Text input, and the next frame turn it back on. This tells SDL
|
||||
// to not generate a text event for this global action map key.
|
||||
SDL_StopTextInput();
|
||||
mOwningManager->updateSDLTextInputState(PlatformWindowManagerSDL::KeyboardInputState::TEXT_INPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue