added support for setup menu as top tree node
authorHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2021 11:56:27 +0000 (12:56 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2021 11:56:27 +0000 (12:56 +0100)
src/libgame/setup.c
src/libgame/system.h

index 8f98ff010db474365fb4c7fd9500e27a5d35f167..1298d9271e8108147d0b1e3fd97f9cf3b5a27169 100644 (file)
@@ -2928,7 +2928,7 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first)
 
   TreeInfo *ti_new2 = createParentTreeInfoNode(ti_new);
 
-  setString(&ti_new2->name, BACKLINK_TEXT_MAIN);
+  setString(&ti_new2->name, TREE_BACKLINK_TEXT(type));
   setString(&ti_new2->name_sorting, ti_new2->name);
 
   return ti_new;
index 87c56d690ef41af15465f8bd01d0f9195ed9f552..f5b2967e5ffc5345b042c15a29fe5ac7e713422c 100644 (file)
 #define INFOTEXT_PLAYER_NAME   "Players & Teams"
 
 #define BACKLINK_TEXT_MAIN     ".. (main menu)"
+#define BACKLINK_TEXT_SETUP    ".. (setup menu)"
 #define BACKLINK_TEXT_PARENT   ".. (parent directory)"
 
 #define TREE_INFOTEXT(t)       ((t) == TREE_TYPE_PLAYER_NAME ?         \
                                 INFOTEXT_MUSIC_DIR :                   \
                                 INFOTEXT_UNDEFINED)
 
+#define TREE_BACKLINK_TEXT(t)  ((t) == TREE_TYPE_LEVEL_DIR ?           \
+                                BACKLINK_TEXT_MAIN :                   \
+                                BACKLINK_TEXT_SETUP)
+
 #define TREE_USERDIR(t)                ((t) == TREE_TYPE_LEVEL_DIR ?           \
                                 getUserLevelDir(NULL) :                \
                                 (t) == TREE_TYPE_GRAPHICS_DIR ?        \