File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Source/GameClient/MessageStream Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ class LoadScreen
6060 virtual void update ( Int percent ); // /< Update the state of the slider bars
6161 virtual void processProgress (Int playerId, Int percentage) = 0;
6262 virtual void setProgressRange ( Int min, Int max ) = 0;
63+ virtual Bool isVideoPlaying ( void ) const { return FALSE ; }
64+ virtual void skipVideo ( void ) { }
6365protected:
6466 void setLoadScreen ( GameWindow *g ) { m_loadScreen = g; }
6567 GameWindow *m_loadScreen; // /< The GameWindow that is our loadscreen
@@ -91,8 +93,8 @@ class SinglePlayerLoadScreen : public LoadScreen
9193
9294 virtual void setProgressRange ( Int min, Int max );
9395
94- Bool isVideoPlaying ( void ) const ;
95- void skipVideo ( void );
96+ virtual Bool isVideoPlaying ( void ) const ;
97+ virtual void skipVideo ( void );
9698
9799private:
98100 GameWindow *m_progressBar; // /< Pointer to the Progress Bar on the window
Original file line number Diff line number Diff line change @@ -312,15 +312,16 @@ GameMessageDisposition WindowTranslator::translateGameMessage(const GameMessage
312312
313313 if (returnCode != WIN_INPUT_USED
314314 && (key == KEY_ESC)
315- && (BitIsSet ( state, KEY_STATE_UP ))
316- && TheGameLogic
317- && TheGameLogic->getLoadScreen () )
315+ && (BitIsSet ( state, KEY_STATE_UP )) )
318316 {
319- SinglePlayerLoadScreen *singlePlayerLoadScreen = dynamic_cast <SinglePlayerLoadScreen*>(TheGameLogic->getLoadScreen ());
320- if ( singlePlayerLoadScreen && singlePlayerLoadScreen->isVideoPlaying () )
317+ if ( TheGameLogic && TheGameLogic->getLoadScreen () )
321318 {
322- singlePlayerLoadScreen->skipVideo ();
323- returnCode = WIN_INPUT_USED;
319+ LoadScreen *loadScreen = TheGameLogic->getLoadScreen ();
320+ if ( loadScreen->isVideoPlaying () )
321+ {
322+ loadScreen->skipVideo ();
323+ returnCode = WIN_INPUT_USED;
324+ }
324325 }
325326 }
326327
You can’t perform that action at this time.
0 commit comments