From 001f9c6cf313ebc605eb84318fa2152e9062d92a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 19 Apr 2020 22:54:40 +0200 Subject: [PATCH] improved keyboard help screen --- help.cpp | 75 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/help.cpp b/help.cpp index c671cc8a..dca098c3 100644 --- a/help.cpp +++ b/help.cpp @@ -26,19 +26,25 @@ struct help_extension { EX vector help_extensions; -vector extra_keys = { - "1 = orthogonal/Gans model", - "2 = small Poincare model/stereographic projection", - "3 = big Poincare model/stereographic projection", +vector quick_keys = { + "1 = orthogonal/Gans model/FPP", + "2 = small Poincare model/stereographic projection/SPP", + "3 = big Poincare model/stereographic projection/TPP", "4 = Klein model/gnomonic projection", "5 = change wall display mode", "6 = change grid", "7 = change heptagon marking", -// "8 = change background color", -// "9 = hyperboloid model", + "8 = monster display mode" + }; + +vector normal_keys = { "qweasdzxc, hjklyubn, numpad = move/skip turn", - "arrows = panning", - "o = world overview", + "g = drop a Dead Orb", + "t = use a ranged Orb (target center of the screen)" + }; + +vector extra_keys = { + "o = world overview (or another meaning in special modes)", "v = menu", "F1 = help", "F5 = restart game", @@ -46,22 +52,37 @@ vector extra_keys = { "Esc = quest status", "Alt+Enter = full screen", "Alt = highlight interesting stuff", - "t = use a ranged Orb (target center of the screen)", - "g = drop a Dead Orb", "click left mouse button = move/skip", - "shift+click left mouse button = use ranged Orb", + "[shift+]click left mouse button = use ranged Orb (depending on mouse settings)", "click right mouse button = context help", "mousewheel up = panning", "hold middle mouse button = panning", + "lctrl + hold middle button = move the screen", "mousewheel down = move/skip", - "shift + mousewheel = change projection", - "ctrl + mousewheel = change zoom", - "ctrl + shift + mousewheel = change both projection and zoom", - "ctrl + hold middle button = move the screen", - "shift + middle button = reset position", + "rshift + mousewheel = change projection", + "lshift + mousewheel = change zoom (lctrl to keep center)", + "lctrl + mousewheel = reset the map center", "shift + F2 = disable the HUD", "shift + F3 = disable the FPS", - "shift + F4 = disable the map" + "shift + F4 = disable the map", + "space = recenter", + "ctrl + = more precision" + }; + +vector extra_keys_2d = { + "arrows = panning", + "PageUp/Down = rotate the screen", + }; + +vector extra_keys_3d = { + "arrows = rotate the camera", + "rshift+arrows = strafe", + "lshift+arrows = rotate the model (in rug mode)", + "end = move camera forward", + "home = move camera backward", + "PageUp/Down = rotate the screen", + "shift+PageUp/Down = zoom", + "move mouse = rotate camera (in rug, only with lctrl)", }; void buildHelpText() { @@ -173,7 +194,18 @@ void buildHelpText() { #if ISMOBILE == 0 help_extensions.push_back(help_extension{'k', XLAT("advanced keyboard shortcuts"), [] () { help = ""; - for(string s: extra_keys) help += s, help += "\n\n"; + for(string s: normal_keys) help += s, help += "\n"; + for(string s: extra_keys) help += s, help += "\n"; + help += "\n\nQuick keys:\n"; + for(string s: quick_keys) help += s, help += "\n"; + if(GDIM == 3 || rug::rugged) { + help += "\n\nIn 3D modes:\n"; + for(string s: extra_keys_3d) help += s, help += "\n"; + } + else { + help += "\n\nIn 2D modes:\n"; + for(string s: extra_keys_2d) help += s, help += "\n"; + } }}); #endif } @@ -1030,6 +1062,13 @@ EX void gotoHelp(const string& h) { #if CAP_RUG if(rug::rugged) { help = rug::makehelp(); + + help += "\n\n"; + + for(string s: extra_keys_3d) help += s, help += "\n"; + + help += "\n\n"; + help_extensions.push_back(help_extension{'m', XLAT("Hypersian Rug menu"), [] () { popScreen(); rug::select(); }}); help_extensions.push_back(help_extension{'h', XLAT("HyperRogue help"), [] () { buildHelpText(); }}); return;