diff --git a/docs/controls.md b/docs/controls.md index 0263fbf4..0c58515e 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -65,7 +65,7 @@ At a game resolution of another shape than 16:9 the game loads `romfs-patches-xb | Switch | Prompt | |---|---| -| A, B, X, Y | E, Shift, Space, left click | +| A, B, X, Y | E, Shift, Space, left click (T in text prompts) | | L, R, ZL, ZR | Q, R, right click, F | | Plus, Minus | Tab, M | | D-pad | 1 (left), 2 (up), 3 (right), 4 (down), as a cross or the keys of the directions meant | @@ -74,7 +74,8 @@ At a game resolution of another shape than 16:9 the game loads `romfs-patches-xb - The glyphs keep the width of the game's own, so the right-aligned guides do not run into their text. A key is a rounded square with its label cut out in the game's own text fonts (Shift: an arrow over its name); a mouse button is a mouse with that button filled and the others hollow. - The button guide in play draws every button from images of the Common archive (`Nt_KeyTexA/B/X/Y/L/ZL_00`, `Nt_KeyTexLSt_00` and `_01`, the stick tilted and pressed): all of them are painted with the same icons. The letters of the action prompt's diamond are one character of the Normal font each: E, an arrow for Shift, a bar for Space, L and R for the mouse buttons. -- Like the Xbox prompts they follow the defaults and not the bindings. `--binds ` draws the first key of each `bind_` line of that file instead, for a folder made by hand. +- Y has two keys, the left mouse button and T. The button guide in play and the action prompt show the left button, which attacks there; the prompts in text (the menus' guides such as *Sort*, the dialogue log's) show T, because while a menu has the pointer the left button is that menu's A, and T presses Y everywhere (`PC_TEXT_KEYS` in `tools/button_icons.py`). With a `bind_y` line, the text prompts take its first key that is not a mouse button (its only key when all are mouse buttons). +- They follow the bindings of the install's `totk.ini` as the setup found them: its *Drawing the keyboard and mouse prompts* step passes the file as `--binds` (the first key of each `bind_` line), and the keyboard defaults without one. After a change on the Controls tab run the setup again: that step alone runs, since it is keyed by the `bind_` lines (`PcPrompts` in `installer/steps.py`). The Xbox prompts follow the defaults. - At a game resolution of another shape than 16:9 the game loads `romfs-patches-pc-x` in place of `romfs-patches-x`: the same prompts with that shape's UI layout, `make_romfs_patches.py --prompts pc --aspect x --reuse \romfs-patches-pc --out \romfs-patches-pc-x`. The setup writes one for each of the fifteen sizes it lays the UI out for, so on a display of one of those shapes the game resolution follows the display with these prompts too. At another size, without that folder, the Switch prompts stay (*off at this game resolution*). ## Window keys diff --git a/installer/gui.py b/installer/gui.py index 9c0dc1fd..cddc6530 100644 --- a/installer/gui.py +++ b/installer/gui.py @@ -619,7 +619,7 @@ class App: # ---- self test --------------------------------------------------------------------------------------------------- SAMPLE_START = {'type': 'start', 'release': 'selftest', 'mode': 'install', 'dest': 'Z:/selftest/TotK', 'log': 'D:\\log.txt', - 'steps': ['check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'cleanup']} + 'steps': ['check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'pc_prompts', 'dlss', 'cleanup']} SAMPLE_RUN = [ SAMPLE_START, {'type': 'plan', 'run': ['check', 'fonts', 'extract'], 'skip': {}}, diff --git a/installer/guilogic.py b/installer/guilogic.py index f17a2dc4..e46b1025 100644 --- a/installer/guilogic.py +++ b/installer/guilogic.py @@ -27,7 +27,7 @@ TEXT = Path(__file__).resolve().parent / 'text' UI_LANGUAGES = ('en', 'ru', 'pt-BR', 'zh-Hans') # what the language switch in the window's corner shows for each UI_LANGUAGE_LABELS = {'en': 'English', 'ru': 'Русский', 'pt-BR': 'Português (Brasil)', 'zh-Hans': '简体中文'} -STEP_ORDER = ('check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'dlss', 'cleanup') +STEP_ORDER = ('check', 'fonts', 'extract', 'lift', 'compile', 'prepare', 'pc_prompts', 'dlss', 'cleanup') # message parameter -> catalog id prefix of the names that replace its raw values PARAM_NAMES = {'lang': 'lang.', 'known': 'lang.', 'step': 'step.', 'input': 'param.input.'} LANG_RU = 0x19 # primary language id of Russian in a Windows LANGID diff --git a/installer/steps.py b/installer/steps.py index 49ce815d..69dcefa0 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -1098,10 +1098,10 @@ class Prepare(Step): # romfs-patches-xbox for the Nintendo pad layout, romfs-patches-xbox-label for xbox and auto (runtime/input_map.c # input_prompts_folder). Both are written on every install, so the menu choices work without another run of # the setup. Optional: when one fails, the game keeps the Switch prompts with that layout and the menu says the - # files are missing, so the setup warns once and goes on. romfs-patches-pc likewise, with keyboard and mouse - # prompts for prompts = pc. + # files are missing, so the setup warns once and goes on. The keyboard and mouse prompts are the PcPrompts + # step's: they follow totk.ini's bindings. failed = None - for style in ('xbox', 'xbox-label', 'pc'): + for style in ('xbox', 'xbox-label'): out = dest / f'romfs-patches-{style}' remove(out) code, log = run_tool(ctx, f'prepare-{style}', layout.tools / 'make_romfs_patches.py', @@ -1116,7 +1116,7 @@ class Prepare(Step): # the prompts and the screen's shape. Only the Common archive differs from romfs-patches-