refresh mapping screen text when automapping is applied because of a joystick plug/unplug

This commit is contained in:
Chris Danford
2006-01-26 04:51:07 +00:00
parent f44603d19b
commit 6a1ef9d858
5 changed files with 22 additions and 0 deletions
+16
View File
@@ -25,6 +25,11 @@ static const int NUM_CHANGABLE_SLOTS = NUM_SHOWN_GAME_TO_DEVICE_SLOTS-1;
REGISTER_SCREEN_CLASS( ScreenMapControllers );
ScreenMapControllers::ScreenMapControllers()
{
this->SubscribeToMessage( Message_AutoJoyMappingApplied );
}
static LocalizedString PLAYER_SLOTS( "ScreenMapControllers", "%s slots" );
void ScreenMapControllers::Init()
{
@@ -449,6 +454,17 @@ void ScreenMapControllers::Refresh()
m_LineScroller.SetDestinationItem( (float) m_iCurButton );
}
void ScreenMapControllers::HandleMessage( const RString& sMessage )
{
if( sMessage == MessageToString(Message_AutoJoyMappingApplied) )
{
Refresh();
}
ScreenWithMenuElements::HandleMessage( sMessage );
}
/*
* (c) 2001-2005 Chris Danford, Glenn Maynard
* All rights reserved.