From c829318686b69163ddaae0f4879c4c3cfed74356 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 9 Mar 2005 01:35:31 +0000 Subject: [PATCH] remove GrabInputFocus and ReleaseInputFocus --- stepmania/src/ScreenManager.cpp | 29 ++--------------------------- stepmania/src/ScreenManager.h | 5 ----- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index a3c642eb4e..0279afd1b7 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -54,7 +54,6 @@ void ScreenManager::Register( const CString& sClassName, CreateScreenFn pfn ) ScreenManager::ScreenManager() { m_pSharedBGA = new Actor; - m_pInputFocus = NULL; 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 ); // pass input only to topmost state - Screen *pInputFocus = m_pInputFocus; - if( pInputFocus == NULL && !m_ScreenStack.empty() ) + Screen *pInputFocus = NULL; + if( !m_ScreenStack.empty() ) pInputFocus = m_ScreenStack.back(); if( pInputFocus != NULL ) @@ -566,30 +565,6 @@ void ScreenManager::SystemMessageNoAnimate( const CString &sMessage ) 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() { diff --git a/stepmania/src/ScreenManager.h b/stepmania/src/ScreenManager.h index f38c9cb6cf..dd1005f9dd 100644 --- a/stepmania/src/ScreenManager.h +++ b/stepmania/src/ScreenManager.h @@ -72,11 +72,6 @@ public: 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(); /* Return true if the given screen is in the main screen stack, but not the bottommost