added hiding info screen sub-menus marked with '.hide'
authorHolger Schemel <info@artsoft.org>
Sat, 9 Apr 2022 17:15:12 +0000 (19:15 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 9 Apr 2022 17:15:12 +0000 (19:15 +0200)
src/files.c
src/libgame/system.h
src/screens.c

index d113c6ad0f9b9733b9f9d5303e9f1336c7bdc4e4..3564470c443802426c5ca3d943bffdfd5a328a22 100644 (file)
@@ -10083,6 +10083,38 @@ static struct TokenInfo internal_setup_tokens[] =
     TYPE_BOOLEAN,
     &setup.internal.menu_save_and_exit,                "menu_save_and_exit"
   },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_title,                        "info_title"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_elements,             "info_elements"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_music,                        "info_music"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_credits,              "info_credits"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_program,              "info_program"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_version,              "info_version"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_levelset,             "info_levelset"
+  },
+  {
+    TYPE_BOOLEAN,
+    &setup.internal.info_exit,                 "info_exit"
+  },
 };
 
 static struct TokenInfo debug_setup_tokens[] =
index 97615e6daf608f3f2a1ba4fd44dd3d2e310e959d..cf2bf1632f66a0289e1c4f1bef5c7724ea2a189b 100644 (file)
@@ -1456,6 +1456,15 @@ struct SetupInternalInfo
   boolean menu_shortcuts;
   boolean menu_exit;
   boolean menu_save_and_exit;
+
+  boolean info_title;
+  boolean info_elements;
+  boolean info_music;
+  boolean info_credits;
+  boolean info_program;
+  boolean info_version;
+  boolean info_levelset;
+  boolean info_exit;
 };
 
 struct SetupDebugInfo
index cf0e528e3b69413649169776246ae4bf058502f2..9055a88aff1992e4984eed819c24252c7fa640ad 100644 (file)
@@ -312,6 +312,8 @@ static void HandleHallOfFame_SelectLevel(int, int);
 static char *getHallOfFameRankText(int, int);
 static char *getHallOfFameScoreText(int, int);
 
+static struct TokenInfo *getSetupInfoFinal(struct TokenInfo *);
+
 static struct GadgetInfo *screen_gadget[NUM_SCREEN_GADGETS];
 
 static int info_mode = INFO_MODE_MAIN;
@@ -2557,6 +2559,9 @@ static void DrawInfoScreen_Main(void)
 
   info_info = info_info_main;
 
+  // use modified info screen info without info screen entries marked as hidden
+  info_info = getSetupInfoFinal(info_info);
+
   // determine maximal number of info entries that can be displayed on screen
   num_info_info = 0;
   for (i = 0; info_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++)
@@ -7156,6 +7161,15 @@ static struct
   { &setup.internal.menu_exit,         execExitSetup                   },
   { &setup.internal.menu_save_and_exit,        execSaveAndExitSetup            },
 
+  { &setup.internal.info_title,                execInfoTitleScreen             },
+  { &setup.internal.info_elements,     execInfoElements                },
+  { &setup.internal.info_music,                execInfoMusic                   },
+  { &setup.internal.info_credits,      execInfoCredits                 },
+  { &setup.internal.info_program,      execInfoProgram                 },
+  { &setup.internal.info_version,      execInfoVersion                 },
+  { &setup.internal.info_levelset,     execInfoLevelSet                },
+  { &setup.internal.info_exit,         execExitInfo                    },
+
   { NULL,                              NULL                            }
 };