interpolate correct menu item to find preferences

fix #797 other minor issue
This commit is contained in:
2025-08-24 12:49:33 -05:00
parent 0a249614c3
commit 4c8c68fe12
2 changed files with 13 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
Welcome to Blades of Exile. These windows will pop up occasionally to explain what is going on. If they annoy you, they can be turned off in the Preferences screen (access from Options menu).
Welcome to Blades of Exile. These windows will pop up occasionally to explain what is going on. If they annoy you, they can be turned off in the Preferences screen (access from the {which-menu} menu).
In general, you can get help by clicking on the '?' buttons or typing '?'. {scen-extra}

View File

@@ -126,6 +126,8 @@ void showFatalError(std::string str1, std::string str2, cDialog* parent) {
giveError(25, "Error!!!", str1, str2, parent);
}
// Help message 1 points to a different menu item on Mac than other platforms
const int FIRST_TIME_HELP_PREFS = 1;
// Help message 2 can contain an addendum specified by whichever scenario the player chooses first
const int FIRST_TIME_HELP_EXTRA = 2;
@@ -151,6 +153,16 @@ static void give_help(short help1,short help2,cDialog* parent,bool help_forced,c
cStrDlog display_strings(str1,str2,"Instant Help",24,PIC_DLOG, parent);
// Interpolate the correct menu item for accessing preferences
if(help1 == FIRST_TIME_HELP_PREFS){
#ifdef SFML_SYSTEM_MACOS
std::string which_menu = "Blades of Exile";
#else
std::string which_menu = "Options";
#endif
display_strings->getControl("str1").replaceText("{which-menu}", which_menu);
}
// Interpolate scenario's special addendum into the first set of help messages.
if(help2 == FIRST_TIME_HELP_EXTRA){
std::string first_time_help_extra;