From: Holger Schemel Date: Sat, 9 Apr 2022 17:15:12 +0000 (+0200) Subject: added hiding info screen sub-menus marked with '.hide' X-Git-Tag: 4.3.2.0~27 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0d2fcc38f14413196242563d64a2d2b52cf28d68;p=rocksndiamonds.git added hiding info screen sub-menus marked with '.hide' --- diff --git a/src/files.c b/src/files.c index d113c6ad..3564470c 100644 --- a/src/files.c +++ b/src/files.c @@ -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[] = diff --git a/src/libgame/system.h b/src/libgame/system.h index 97615e6d..cf2bf163 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -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 diff --git a/src/screens.c b/src/screens.c index cf0e528e..9055a88a 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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 } };