mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-01 02:25:15 +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
|
|
@ -39,7 +39,8 @@ WindowInputGenerator::WindowInputGenerator( PlatformWindow *window ) :
|
|||
mLastCursorPos(0,0),
|
||||
mClampToWindow(true),
|
||||
mFocused(false),
|
||||
mPixelsPerMickey(1.0f)
|
||||
mPixelsPerMickey(1.0f),
|
||||
mLastPressWasGlobalActionMap(false)
|
||||
{
|
||||
AssertFatal(mWindow, "NULL PlatformWindow on WindowInputGenerator creation");
|
||||
|
||||
|
|
@ -82,6 +83,9 @@ WindowInputGenerator::~WindowInputGenerator()
|
|||
//-----------------------------------------------------------------------------
|
||||
void WindowInputGenerator::generateInputEvent( InputEventInfo &inputEvent )
|
||||
{
|
||||
// Reset last press being global
|
||||
mLastPressWasGlobalActionMap = false;
|
||||
|
||||
if (!mInputController)// || !mFocused)
|
||||
return;
|
||||
|
||||
|
|
@ -102,7 +106,10 @@ void WindowInputGenerator::generateInputEvent( InputEventInfo &inputEvent )
|
|||
|
||||
// Give the ActionMap first shot.
|
||||
if (ActionMap::handleEventGlobal(&inputEvent))
|
||||
{
|
||||
mLastPressWasGlobalActionMap = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mInputController->processInputEvent(inputEvent))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue