remove GrabInputFocus and ReleaseInputFocus
This commit is contained in:
@@ -54,7 +54,6 @@ void ScreenManager::Register( const CString& sClassName, CreateScreenFn pfn )
|
|||||||
ScreenManager::ScreenManager()
|
ScreenManager::ScreenManager()
|
||||||
{
|
{
|
||||||
m_pSharedBGA = new Actor;
|
m_pSharedBGA = new Actor;
|
||||||
m_pInputFocus = NULL;
|
|
||||||
|
|
||||||
m_MessageSendOnPop = SM_None;
|
m_MessageSendOnPop = SM_None;
|
||||||
|
|
||||||
@@ -249,8 +248,8 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
|
|||||||
// DeviceI.device, DeviceI.button, GameI.controller, GameI.button, MenuI.player, MenuI.button, StyleI.player, StyleI.col );
|
// DeviceI.device, DeviceI.button, GameI.controller, GameI.button, MenuI.player, MenuI.button, StyleI.player, StyleI.col );
|
||||||
|
|
||||||
// pass input only to topmost state
|
// pass input only to topmost state
|
||||||
Screen *pInputFocus = m_pInputFocus;
|
Screen *pInputFocus = NULL;
|
||||||
if( pInputFocus == NULL && !m_ScreenStack.empty() )
|
if( !m_ScreenStack.empty() )
|
||||||
pInputFocus = m_ScreenStack.back();
|
pInputFocus = m_ScreenStack.back();
|
||||||
|
|
||||||
if( pInputFocus != NULL )
|
if( pInputFocus != NULL )
|
||||||
@@ -566,30 +565,6 @@ void ScreenManager::SystemMessageNoAnimate( const CString &sMessage )
|
|||||||
MESSAGEMAN->Broadcast( "SystemMessageNoAnimate" );
|
MESSAGEMAN->Broadcast( "SystemMessageNoAnimate" );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ScreenManager::GrabInputFocus( const Screen *pScreen )
|
|
||||||
{
|
|
||||||
if( m_pInputFocus != NULL )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Sanity check: make sure that the screen is in m_OverlayScreens. */
|
|
||||||
for( unsigned i = 0; i < m_OverlayScreens.size(); ++i )
|
|
||||||
{
|
|
||||||
if( m_OverlayScreens[i] == pScreen )
|
|
||||||
{
|
|
||||||
m_pInputFocus = m_OverlayScreens[i];
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FAIL_M( "GrabInputFocus: unknown screen" );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenManager::ReleaseInputFocus( const Screen *pScreen )
|
|
||||||
{
|
|
||||||
ASSERT( m_pInputFocus == pScreen );
|
|
||||||
m_pInputFocus = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ScreenManager::RefreshCreditsMessages()
|
void ScreenManager::RefreshCreditsMessages()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,11 +72,6 @@ public:
|
|||||||
|
|
||||||
CString GetCurrentSystemMessage() const { return m_sSystemMessage; }
|
CString GetCurrentSystemMessage() const { return m_sSystemMessage; }
|
||||||
|
|
||||||
/* Overlay screens can grab input focus. Only one screen may grab at a time;
|
|
||||||
* if another screen has already taken focus, this returns false. */
|
|
||||||
bool GrabInputFocus( const Screen *pScreen );
|
|
||||||
void ReleaseInputFocus( const Screen *pScreen );
|
|
||||||
|
|
||||||
Screen *GetTopScreen();
|
Screen *GetTopScreen();
|
||||||
|
|
||||||
/* Return true if the given screen is in the main screen stack, but not the bottommost
|
/* Return true if the given screen is in the main screen stack, but not the bottommost
|
||||||
|
|||||||
Reference in New Issue
Block a user