From: Holger Schemel Date: Tue, 2 Feb 2021 11:56:27 +0000 (+0100) Subject: added support for setup menu as top tree node X-Git-Tag: 4.2.3.0~29 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=bcffcb9d803359d36cad2130f065de3bbf38d7bc;p=rocksndiamonds.git added support for setup menu as top tree node --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 8f98ff01..1298d927 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -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; diff --git a/src/libgame/system.h b/src/libgame/system.h index 87c56d69..f5b2967e 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -783,6 +783,7 @@ #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 ? \ @@ -799,6 +800,10 @@ 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 ? \