Made input callbacks lock during transitions and lockinput.

This commit is contained in:
Kyzentun
2014-12-10 13:38:10 -07:00
parent c9a17dc48e
commit 6f8b5f2477
3 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -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;
}
+1
View File
@@ -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; }
+1
View File
@@ -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();