From: Holger Schemel Date: Tue, 2 Feb 2021 16:55:57 +0000 (+0100) Subject: added parent link to custom artwork tree to go back to setup menu X-Git-Tag: 4.2.3.0~27 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e4b7c9e4311be22d09f17611d6978f23dc1e69f6;p=rocksndiamonds.git added parent link to custom artwork tree to go back to setup menu --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 192e2ce6..7c864576 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -4068,6 +4068,9 @@ static void LoadArtworkInfoFromLevelInfo(ArtworkDirTree **artwork_node) LoadArtworkInfoFromLevelInfoExt(artwork_node, NULL, leveldir_first_all, TRUE); LoadArtworkInfoFromLevelInfoExt(artwork_node, NULL, leveldir_first_all, FALSE); + // add top tree node over all three separate sub-trees + *artwork_node = createTopTreeInfoNode(*artwork_node); + // set all parent links (back links) in complete artwork tree setTreeInfoParentNodes(*artwork_node, NULL); } diff --git a/src/screens.c b/src/screens.c index a716f5ea..36125cd5 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4355,9 +4355,16 @@ static void DrawChooseTree(TreeInfo **ti_ptr) if (strEqual((*ti_ptr)->subdir, STRING_TOP_DIRECTORY)) { - SetGameStatus(GAME_MODE_MAIN); + if (game_status == GAME_MODE_SETUP) + { + execSetupArtwork(); + } + else // GAME_MODE_LEVELS + { + SetGameStatus(GAME_MODE_MAIN); - DrawMainMenu(); + DrawMainMenu(); + } return; }