Fix: the disease button was not always set back correctly

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7441 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-08-28 01:16:59 +00:00
parent f3edcd3d92
commit 3bc2ea294c
+7 -2
View File
@@ -335,6 +335,11 @@ BOOLEAN CreateButtonsForMapBorder( void )
if ( gGameExternalOptions.fDisease && gGameExternalOptions.fDiseaseStrategic )
{
giMapBorderButtonsImage[MAP_BORDER_DISEASE_BTN] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti", -1, 31, -1, 32, -1 );
// if the button image cannot be created, this is likely to a custom sti replacement that isn't up to date to this feature - just use some other images then
if ( giMapBorderButtonsImage[MAP_BORDER_DISEASE_BTN] < 0 )
giMapBorderButtonsImage[MAP_BORDER_DISEASE_BTN] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti", -1, 2, -1, 11, -1 );
giMapBorderButtons[MAP_BORDER_DISEASE_BTN] = QuickCreateButton( giMapBorderButtonsImage[MAP_BORDER_DISEASE_BTN], MAP_BORDER_DISEASE_BTN_X, MAP_BORDER_DISEASE_BTN_Y,
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnDiseaseCallback );
@@ -1023,7 +1028,7 @@ void TurnOnAirSpaceMode( void )
if ( fShowStrategicDiseaseFlag )
{
fShowStrategicDiseaseFlag = MAPMODE_DISEASE;
fShowStrategicDiseaseFlag = MAPMODE_OFF;
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
}
@@ -1248,7 +1253,7 @@ void TurnOnMobileFilterMode( void )
if ( fShowStrategicDiseaseFlag )
{
fShowStrategicDiseaseFlag = MAPMODE_DISEASE;
fShowStrategicDiseaseFlag = MAPMODE_OFF;
MapBorderButtonOff( MAP_BORDER_DISEASE_BTN );
}