an option to not display default help

This commit is contained in:
Zeno Rogue 2023-03-25 09:24:47 +01:00
parent 7e79661ce0
commit 08bf3fe3d6
4 changed files with 15 additions and 3 deletions

View File

@ -1961,6 +1961,8 @@ EX void configureInterface() {
XLAT("Maximum number of messages on screen."));
dialog::bound_low(0);
});
add_edit(nohelp);
add_edit(vid.msgleft);
@ -2671,6 +2673,13 @@ EX int config3 = addHook(hooks_configfile, 100, [] {
addsaver(vid.auto_eye, "auto-eyelevel", false);
param_enum(nohelp, "help_messages", "help_messages", 0)
-> editable({
{"all", "all context help/welcome messages"},
{"none", "no context help/welcome messages"},
{"automatic", "I know I can press F1 for help"},
}, "context help", 'H');
param_f(vid.creature_scale, "creature_scale", "3d-creaturescale", 1)
->editable(0, 1, .1, "Creature scale", "", 'C');
param_f(vid.height_width, "heiwi", "3d-heightwidth", 1.5)

View File

@ -5690,7 +5690,7 @@ EX void emptyscreen() {
drawqueue();
}
EX bool nohelp;
EX int nohelp;
EX bool no_find_player;
EX void normalscreen() {
@ -5836,7 +5836,7 @@ EX void drawscreen() {
color_t col = linf[cwt.at->land].color;
if(cwt.at->land == laRedRock) col = 0xC00000;
if(titlecolor) col = titlecolor;
if(!nohelp)
if(nohelp != 1)
displayfr(vid.xres/2, vid.fsize, 2, vid.fsize, mouseovers, col, 8);
#endif

View File

@ -218,6 +218,7 @@ EX void buildHelpText() {
}
EX string standard_help() {
if(nohelp == 2) return "";
return XLAT("Press F1 or right click for help");
}
@ -239,7 +240,7 @@ EX void buildCredits() {
"Kojiguchi Kazuki, baconcow, Alan, SurelyYouJest, hotdogPi, DivisionByZero, xXxWeedGokuxXx, jpystynen, Dmitry Marakasov, Alexandre Moine, Arthur O'Dwyer, "
"Triple_Agent_AAA, bluetailedgnat, Allalinor, Shitford, KittyTac, Christopher King, KosGD, TravelDemon, Bubbles, rdococ, frozenlake, MagmaMcFry, "
"Snakebird Priestess, roaringdragon2, Stopping Dog, bengineer8, Sir Light IJIJ, ShadeBlade, Saplou, shnourok, Ralith, madasa, 6% remaining, Chimera245, Remik Pi, alien foxcat thing, "
"Piotr Grochowski, Ann, still-flow, tyzone, Paradoxica, LottieRatWorld, aismallard, albatross, EncodedSpirit, Jacob Mandelson, CrashTuvai, cvoight, jennlbw"
"Piotr Grochowski, Ann, still-flow, tyzone, Paradoxica, LottieRatWorld, aismallard, albatross, EncodedSpirit, Jacob Mandelson, CrashTuvai, cvoight, jennlbw, Kali Ranya"
);
#ifdef EXTRALICENSE
help += EXTRALICENSE;

View File

@ -77,6 +77,7 @@ EX hookset<bool()> hooks_welcome_message;
/** \brief Print the welcome message during the start of game. Depends on the current mode and other settings. */
EX void welcomeMessage() {
if(callhandlers(false, hooks_welcome_message)) return;
if(nohelp == 1) return;
if(embedded_plane) return IPF(welcomeMessage());
#if CAP_TOUR
else if(tour::on) return; // displayed by tour
@ -140,6 +141,7 @@ EX void welcomeMessage() {
addMessage(XLAT(lv.msg));
}
if(nohelp == 2) return;
#if ISMAC
addMessage(XLAT("Press F1 or right-shift-click things for help."));
#elif !ISMOBILE