mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fixes by rftr:
- options screen: fixed crash related to handling inputs while the screen was loading/refreshing - options screen and features screen: added 'Q' input handling to quit to the main menu git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9235 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -796,6 +796,13 @@ void GetUserInput()
|
|||||||
{
|
{
|
||||||
switch (Event.usParam)
|
switch (Event.usParam)
|
||||||
{
|
{
|
||||||
|
case 'q':
|
||||||
|
case 'Q':
|
||||||
|
//Confirm the Exit to the main menu screen
|
||||||
|
DoMessageBox(MSG_BOX_BASIC_STYLE, zOptionsText[OPT_RETURN_TO_MAIN], FEATURES_SCREEN, MSG_BOX_FLAG_YESNO,
|
||||||
|
ConfirmQuitToMainMenuMessageBoxCallBack);
|
||||||
|
break;
|
||||||
|
|
||||||
case ESC:
|
case ESC:
|
||||||
SetExitScreen(guiPreviousScreen);
|
SetExitScreen(guiPreviousScreen);
|
||||||
break;
|
break;
|
||||||
|
|||||||
+17
-2
@@ -81,6 +81,7 @@ INT32 giOptionsMessageBox = -1; // Options pop up messages index value
|
|||||||
|
|
||||||
INT8 gbHighLightedOptionText = -1;
|
INT8 gbHighLightedOptionText = -1;
|
||||||
|
|
||||||
|
BOOLEAN gfOptionsScreenUnloading = FALSE;
|
||||||
//BOOLEAN gfHideBloodAndGoreOption=FALSE; //all this blood gore option enforcment is unused
|
//BOOLEAN gfHideBloodAndGoreOption=FALSE; //all this blood gore option enforcment is unused
|
||||||
//If a germany build we are to hide the blood and gore option
|
//If a germany build we are to hide the blood and gore option
|
||||||
|
|
||||||
@@ -226,11 +227,13 @@ UINT32 OptionsScreenHandle()
|
|||||||
BlitBufferToBuffer( guiRENDERBUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
BlitBufferToBuffer( guiRENDERBUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetOptionsScreenUserInput();
|
||||||
|
}
|
||||||
|
|
||||||
RestoreBackgroundRects();
|
RestoreBackgroundRects();
|
||||||
|
|
||||||
GetOptionsScreenUserInput();
|
|
||||||
|
|
||||||
HandleOptionsScreen();
|
HandleOptionsScreen();
|
||||||
|
|
||||||
if( gfRedrawOptionsScreen )
|
if( gfRedrawOptionsScreen )
|
||||||
@@ -759,11 +762,16 @@ BOOLEAN EnterOptionsScreen()
|
|||||||
gfSettingOfDontAnimateSmoke = gGameSettings.fOptions[ TOPTION_ANIMATE_SMOKE ];
|
gfSettingOfDontAnimateSmoke = gGameSettings.fOptions[ TOPTION_ANIMATE_SMOKE ];
|
||||||
|
|
||||||
gfSettingOfTacticalFaceIcon = gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ];
|
gfSettingOfTacticalFaceIcon = gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ];
|
||||||
|
gfOptionsScreenUnloading = FALSE;
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExitOptionsScreen()
|
void ExitOptionsScreen()
|
||||||
{
|
{
|
||||||
|
if (gfOptionsScreenUnloading == TRUE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
gfOptionsScreenUnloading = TRUE;
|
||||||
|
|
||||||
if( gfExitOptionsDueToMessageBox )
|
if( gfExitOptionsDueToMessageBox )
|
||||||
{
|
{
|
||||||
@@ -963,6 +971,13 @@ void GetOptionsScreenUserInput()
|
|||||||
{
|
{
|
||||||
switch( Event.usParam )
|
switch( Event.usParam )
|
||||||
{
|
{
|
||||||
|
case 'q':
|
||||||
|
case 'Q':
|
||||||
|
//Confirm the Exit to the main menu screen
|
||||||
|
DoOptionsMessageBox( MSG_BOX_BASIC_STYLE, zOptionsText[OPT_RETURN_TO_MAIN], OPTIONS_SCREEN, MSG_BOX_FLAG_YESNO,
|
||||||
|
ConfirmQuitToMainMenuMessageBoxCallBack );
|
||||||
|
break;
|
||||||
|
|
||||||
case ESC:
|
case ESC:
|
||||||
SetOptionsExitScreen( guiPreviousOptionScreen );
|
SetOptionsExitScreen( guiPreviousOptionScreen );
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user