From 215f9881db4018b187e7f5d418ceb201e5ea1551 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 17 Dec 2025 22:15:39 +0100 Subject: [PATCH] use 'never_keys' in more places --- config.cpp | 7 +++++-- dialogs.cpp | 10 ++++++---- graph.cpp | 4 ++-- quit.cpp | 5 ++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/config.cpp b/config.cpp index 11cb8f72..2aa61332 100644 --- a/config.cpp +++ b/config.cpp @@ -4031,7 +4031,7 @@ EX void show_color_dialog_game() { dialog::addBoolItem_action(XLAT("higher contrast"), higher_contrast, 'h'); dialog::addInfo(XLAT("colors of some game objects")); - dialog::addInfo(XLAT("can be edited by clicking them.")); + dialog::addInfo(dialog::never_keys() ? XLAT("can be edited by touching them.") : XLAT("can be edited by clicking them.")); dialog::addBreak(50); dialog::addBack(); @@ -4215,7 +4215,10 @@ EX void configureMouse() { #if ISMOBILE dialog::addBoolItem(XLAT("targetting ranged Orbs long-click only"), (vid.shifttarget&2), 'i'); #else - dialog::addBoolItem(XLAT("targetting ranged Orbs Shift+click only"), (vid.shifttarget&1), 'i'); + if(dialog::never_keys()) + dialog::addBoolItem(XLAT("automatically target ranged Orbs by touch"), !(vid.shifttarget&1), 'i'); + else + dialog::addBoolItem(XLAT("targetting ranged Orbs Shift+click only"), (vid.shifttarget&1), 'i'); #endif dialog::add_action([] {vid.shifttarget = vid.shifttarget^3; }); diff --git a/dialogs.cpp b/dialogs.cpp index 5699017a..6bbfcf52 100644 --- a/dialogs.cpp +++ b/dialogs.cpp @@ -1490,10 +1490,12 @@ EX namespace dialog { else addSlider(ne.sc.direct(ne.vmin), ne.sc.direct(*ne.editwhat), ne.sc.direct(ne.vmax), 500); addBreak(100); -#if !ISMOBILE - addHelp(XLAT("You can scroll with arrow keys -- Ctrl to fine-tune")); - addBreak(100); -#endif + + if(!never_keys()) { + if(actual_display_keys()) addHelp(XLAT("You can scroll with arrow keys -- Ctrl to fine-tune")); + else addBreak(100); + addBreak(100); + } dialog::addBack(); addSelItem(XLAT("default value"), disp(ne.dft), SDLK_HOME); diff --git a/graph.cpp b/graph.cpp index 8c65871d..ebbf7a21 100644 --- a/graph.cpp +++ b/graph.cpp @@ -1827,9 +1827,9 @@ EX void show_menu_button() { ; #if CAP_TOUR else if(tour::on) - displayButton(vid.xres-8, vid.yres-vid.fsize, XLAT("(ESC) tour menu"), SDLK_ESCAPE, 16); + displayButton(vid.xres-8, vid.yres-vid.fsize, dialog::never_keys() ? XLAT("tour menu") : XLAT("(ESC) tour menu"), SDLK_ESCAPE, 16); #endif - else if(dialog::display_keys == 3) + else if(dialog::never_keys()) displayButton(vid.xres-8, vid.yres-vid.fsize, separate_status ? XLAT("quest") : XLAT("menu"), SDLK_ESCAPE, 16); else displayButton(vid.xres-8, vid.yres-vid.fsize, XLAT("(v) menu"), 'v', 16); diff --git a/quit.cpp b/quit.cpp index 81dbf3c5..bb01a732 100644 --- a/quit.cpp +++ b/quit.cpp @@ -92,7 +92,7 @@ EX hint hints[] = { { 0, []() { - return !ISMOBILE; + return !dialog::never_keys(); }, []() { dialog::addHelp(XLAT( @@ -147,8 +147,7 @@ EX hint hints[] = { 0, []() { return in_full_game(); }, []() { - dialog::addInfo( - (ISMOBILE || dialog::display_keys == 3) ? + dialog::addInfo(dialog::never_keys() ? XLAT("The 'world overview' shows all the lands in HyperRogue.") : XLAT("Press 'o' to see all the lands in HyperRogue.")