Made input callbacks lock during transitions and lockinput.
This commit is contained in:
+2
-1
@@ -304,7 +304,8 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
||||
|
||||
bool Screen::PassInputToLua(const InputEventPlus& input)
|
||||
{
|
||||
if(m_InputCallbacks.empty())
|
||||
if(m_InputCallbacks.empty() || m_fLockInputSecs > 0.0f
|
||||
|| !AllowCallbackInput())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@ public:
|
||||
bool PassInputToLua(const InputEventPlus& input);
|
||||
void AddInputCallbackFromStack(lua_State* L);
|
||||
void RemoveInputCallback(lua_State* L);
|
||||
virtual bool AllowCallbackInput() { return true; }
|
||||
|
||||
// let subclass override if they want
|
||||
virtual bool MenuUp(const InputEventPlus &) { return false; }
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
void StartTransitioningScreen( ScreenMessage smSendWhenDone );
|
||||
virtual void Cancel( ScreenMessage smSendWhenDone );
|
||||
bool IsTransitioning();
|
||||
virtual bool AllowCallbackInput() { return !IsTransitioning(); }
|
||||
|
||||
void StopTimer();
|
||||
void ResetTimer();
|
||||
|
||||
Reference in New Issue
Block a user