From: Holger Schemel Date: Mon, 12 Dec 2022 19:31:59 +0000 (+0100) Subject: added returning directly to main menu from info sub-screens if needed X-Git-Tag: 4.3.4.0~24 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ef4f7a42b94ef8ea44f039766218433a400ae418;p=rocksndiamonds.git added returning directly to main menu from info sub-screens if needed --- diff --git a/src/screens.c b/src/screens.c index 394f5292..c01d7356 100644 --- a/src/screens.c +++ b/src/screens.c @@ -318,6 +318,8 @@ static struct GadgetInfo *screen_gadget[NUM_SCREEN_GADGETS]; static int info_mode = INFO_MODE_MAIN; static int setup_mode = SETUP_MODE_MAIN; +static boolean info_screens_from_main = FALSE; + static TreeInfo *window_sizes = NULL; static TreeInfo *window_size_current = NULL; @@ -2537,6 +2539,18 @@ static void DrawInfoScreen_Main(void) int fade_mask = REDRAW_FIELD; int i; + // (needed after displaying info sub-screens directly from main menu) + if (info_screens_from_main) + { + info_screens_from_main = FALSE; + + SetGameStatus(GAME_MODE_MAIN); + + DrawMainMenu(); + + return; + } + if (redraw_mask & REDRAW_ALL) fade_mask = REDRAW_ALL; @@ -3856,6 +3870,7 @@ void DrawInfoScreen_FromMainMenu(int nr) SetGameStatus(GAME_MODE_INFO); info_mode = nr;; + info_screens_from_main = TRUE; FadeSetEnterScreen();