Add game paused message in Game Options when in flight.

master
Konstantinos Sykas 2020-11-15 21:54:25 +02:00 committed by GitHub
parent 15a7f107e0
commit e4d06c78a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 5 deletions

View File

@ -8941,6 +8941,7 @@ static NSString *SliderString(NSInteger amountIn20ths)
- (void) setGuiToLoadSaveScreen
{
BOOL gamePaused = [[UNIVERSE gameController] isGamePaused];
BOOL canLoadOrSave = NO;
MyOpenGLView *gameView = [UNIVERSE gameView];
OOGUIScreenID oldScreen = gui_screen;
@ -9003,7 +9004,7 @@ static NSString *SliderString(NSInteger amountIn20ths)
[gui setSelectableRange:NSMakeRange(first_sel_row, GUI_ROW_OPTIONS_END_OF_LIST)];
if ([[UNIVERSE gameController] isGamePaused] || (!canLoadOrSave && [self status] == STATUS_DOCKED))
if (gamePaused || (!canLoadOrSave && [self status] == STATUS_DOCKED))
{
[gui setSelectedRow: GUI_ROW(,GAMEOPTIONS)];
}
@ -9022,13 +9023,20 @@ static NSString *SliderString(NSInteger amountIn20ths)
/* ends */
[[UNIVERSE gameView] clearMouse];
[self setShowDemoShips:NO];
gui_screen = GUI_SCREEN_OPTIONS;
[self setShowDemoShips:NO];
[UNIVERSE enterGUIViewModeWithMouseInteraction:YES];
[self noteGUIDidChangeFrom:oldScreen to:gui_screen];
if (gamePaused)
{
[[UNIVERSE messageGUI] clear];
NSString *pauseKey = [PLAYER keyBindingDescription:@"key_pausebutton"];
[UNIVERSE addMessage:OOExpandKey(@"game-paused-docked", pauseKey) forCount:1.0 forceDisplay:YES];
}
[self noteGUIDidChangeFrom:oldScreen to:gui_screen];
}