From 34ee6684a9a5d4d72cfd57c48d10ad33422235d6 Mon Sep 17 00:00:00 2001 From: Louis Justice Date: Tue, 10 Nov 2026 19:38:43 -0500 Subject: [PATCH] In dialogue the left mouse button presses B and the right one A instead of their bindings (dialogue_click, game 1.4.3). By default the left button is Y, which opens the dialogue log in a dialogue box. While MessageDialog_00 is open the left button now presses B, which advances the text and shows the rest of a scrolling line, and the right one A. Dialogue choices keep the menu pointer, where a left click picks the choice under it, so clicking through a conversation does not pick the choice the focus starts on. The setting is live and independent of menu_cursor. Co-Authored-By: Claude Opus 5.5 --- docs/controls.md | 4 +++ runtime/cfg.c | 5 ++-- runtime/input.c | 14 +++++++++ runtime/input.h | 2 ++ runtime/menu_cursor.c | 68 +++++++++++++++++++++++++++++++++++++++---- runtime/ui/menu.cpp | 1 + runtime/ui_text.c | 8 +++++ runtime/ui_text.h | 1 + totk.ini.example | 6 ++++ 9 files changed, 102 insertions(+), 7 deletions(-) diff --git a/docs/controls.md b/docs/controls.md index 0263fbf4..f24f83a9 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -203,6 +203,10 @@ On game 1.4.3, while one of the game's menus has its focus box (the frame the d- `runtime/menu_cursor.c` reads eui's screens at each pad read and moves the focus with the writes `eui::BoxCursorMgr::moveBoxCursor` makes, so no game code is called. `menu_cursor = 0` (`TOTK_MENU_CURSOR=0`, live; the *Mouse in the game's menus* row of the Controls tab) turns it off; `TOTK_MENU_CURSOR_LOG=1` logs every screen it reads (by default the first six), with the layout size, the node count and the hit panes it uses. +### Clicks in dialogue + +On game 1.4.3, while a dialogue box is open (the layout `MessageDialog_00`: a character's lines and the game's own messages), the left mouse button presses B and the right one A, instead of the buttons they are bound to. B continues the text as A does and also shows the rest of a line that is still scrolling in; the left button's default, Y, would open the dialogue log there, and the log stays in the way until B closes it. Dialogue choices are a menu with the focus box, so the pointer above takes their clicks and a left click is A on the choice under it: clicking through a conversation fast does not pick the choice the focus starts on. A press is the dialogue's button or the binding from the moment the button goes down until it is released: the click that closes the last box does not become an attack while it is still held, and a button held when the box opens does not skip its first line. Between two lines of a conversation the game closes the box and opens it again, so both buttons stay B and A for 500 ms after the box was last open (`DIALOGUE_GAP_MS`); the first clicks after a conversation fall in that time too, as they do for a player who taps the button through the last line. `TOTK_MENU_CURSOR_LOG=1` logs how long each such gap was. The dialogue window has no focus box of its own: the scan of `eui::ScreenMgr`'s open screens (every 100 ms) finds its screen, and from then on that screen's state is read at every pad read (`dialogue_shown` in `runtime/menu_cursor.c`), so the first click after a box opens is already the dialogue's. `dialogue_click = 0` (`TOTK_DIALOGUE_CLICK=0`, live; the *Clicks in dialogue* row of the Controls tab) leaves both buttons on their bindings; the setting does not depend on `menu_cursor`. The log names the first box it sees (`menu_cursor: a dialogue box is open ...`). + ## Nintendo Switch 2 controllers Windows does not present the Switch 2 Pro Controller as a gamepad SDL can open (the log says `input: no gamepad`), so it needs a bridge program that wakes it and creates a virtual gamepad. The DS4Windows fork by hbashton ([github.com/hbashton/DS4Windows](https://github.com/hbashton/DS4Windows), tested with release VIIPERRC4.5.1, a pre-release) with the output set to an emulated DualSense gives buttons, rumble, gyro and accelerometer, and reads the sticks through the controller's calibration (they rest at 0 to 2%). The game reads its virtual DualSense directly; the log then shows `input: gamepad "DualSense Wireless Controller" (rumble, gyro and accelerometer, ...)` and `input: motion sensors on`. Its release notes also list Joy-Con 2 support, which is untested here. diff --git a/runtime/cfg.c b/runtime/cfg.c index dbb73f7d..31059806 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -40,7 +40,7 @@ static const char *const known[] = { "BIND_SKIP", "BIND_STATS", "BIND_UP", "BIND_X", "BIND_Y", "BIND_ZL", "BIND_ZR", "BLOCK_VIEWS_3D", "CLIMB_FIX", "CLOTH_REALTIME", "COLOR_BRIGHTNESS", "COLOR_CONTRAST", "COLOR_GAMMA", "COLOR_PRESET", "COLOR_SATURATION", "CONTACT_DEBUG", "CONTACT_SHADOWS", "CORE_DIAG", "CRIT", "CRIT_OUT", - "DESC_TEMPLATE", "DESWIZZLE", "DEVICE_PROFILE", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", + "DESC_TEMPLATE", "DESWIZZLE", "DEVICE_PROFILE", "DIALOGUE_CLICK", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR", "DUMP_LOG", "DYNAMIC_RES", "DYN_DELTA", "EXEFS", "FEEDBACK", "FIXED_RES_PATCH", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FLUSH_SPAN", "FOV", "FOV_PATCH", "FPS60", "FPS_LIMIT", "FRAME_QUEUE", "FREEZE_IDLE", "FREE_CORES", @@ -89,7 +89,7 @@ static const struct { const char *key, *section; } sections[] = { {"MOTION", "input"}, {"RUMBLE_STRENGTH", "input"}, {"RUMBLE_CURVE", "input"}, {"RUMBLE_TRIGGERS", "input"}, {"PAD_LAYOUT", "input"}, {"PROMPTS", "input"}, {"STICK_DEADZONE", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"}, {"STICK_SENS", "input"}, - {"MENU_CURSOR", "input"}, {"MOUSE_MODE", "input"}, {"MOUSE_SENS", "input"}, {"MOUSE_AIM_SCALE", "input"}, {"WALK_KEY", "input"}, {"WALK_SCALE", "input"}, {"INPUT_RECORD", "input"}, + {"MENU_CURSOR", "input"}, {"DIALOGUE_CLICK", "input"}, {"MOUSE_MODE", "input"}, {"MOUSE_SENS", "input"}, {"MOUSE_AIM_SCALE", "input"}, {"WALK_KEY", "input"}, {"WALK_SCALE", "input"}, {"INPUT_RECORD", "input"}, {"BIND_A", "input"}, {"BIND_B", "input"}, {"BIND_X", "input"}, {"BIND_Y", "input"}, {"BIND_LCLICK", "input"}, {"BIND_RCLICK", "input"}, {"BIND_L", "input"}, {"BIND_R", "input"}, {"BIND_ZL", "input"}, {"BIND_ZR", "input"}, {"BIND_PLUS", "input"}, {"BIND_MINUS", "input"}, {"BIND_LEFT", "input"}, {"BIND_UP", "input"}, @@ -156,6 +156,7 @@ static const CfgMeta metas[] = { {"LSTICK_DEADZONE", "", "0..50", LIVE}, {"RSTICK_DEADZONE", "", "0..50", LIVE}, {"MOUSE_MODE", "direct", "stick|direct", LIVE}, {"MOUSE_SENS", "1", "0..10", LIVE}, {"MOUSE_AIM_SCALE", "1", "0.1..3", LIVE}, {"MENU_CURSOR", "1", "0|1", LIVE}, + {"DIALOGUE_CLICK", "1", "0|1", LIVE}, // menu_cursor.c: in a dialogue box left click is B, right click A {"WALK_KEY", "none", NULL, LIVE}, {"WALK_SCALE", "0.51", "0.2..0.9", LIVE}, {"MENU_LANG", "", "en|ru|pt-BR|zh-Hans", LIVE}, {"AMIIBO_DIR", "", NULL, LIVE}, diff --git a/runtime/input.c b/runtime/input.c index 6cfca650..00473416 100644 --- a/runtime/input.c +++ b/runtime/input.c @@ -641,6 +641,20 @@ static void poll_merged(uint64_t *buttons, int32_t *lx, int32_t *ly, int32_t *rx if (!counts || mouse_ignore[k]) down[k] = 0; } was_captured = cap; + // While a dialogue box is on screen (menu_cursor.c, TOTK_DIALOGUE_CLICK) the left mouse button presses B, + // which advances the text and also shows the rest of a line at once, and the right one presses A, instead + // of their bindings: Y by default, which opens the dialogue log there, and ZL. A press is one or the other + // from the moment it goes down until it is released, so a click that closes the last box does not turn + // into an attack while it is still held, and a button held as the box opens does not skip its first line. + // Dialogue choices have the pointer, and their clicks are menu_cursor.c's: a left click there is A. + static const uint8_t click_key[2] = {KEY_MOUSE_L, KEY_MOUSE_R}, click_btn[2] = {B_B, B_A}; + static int click_held[2], click_talk[2]; + for (int i = 0; i < 2; i++) { + int key = click_key[i]; + if (!down[key]) click_held[i] = click_talk[i] = 0; + else if (!click_held[i]) click_held[i] = 1, click_talk[i] = menu_cursor_dialogue(); + if (click_talk[i]) down[key] = 0, b |= 1ull << click_btn[i]; + } b |= input_map_buttons(down); int32_t k[2]; walk_get(); diff --git a/runtime/input.h b/runtime/input.h index 3c5be2f6..9734bad7 100644 --- a/runtime/input.h +++ b/runtime/input.h @@ -35,6 +35,8 @@ int menu_cursor_shortcut(void); void menu_cursor_poll(uint64_t *buttons); int menu_cursor_pointer(void); int menu_cursor_map(void); // the Purah Pad's map is open: the mouse's stick is the left one (its cursor) +// a dialogue box is on screen and TOTK_DIALOGUE_CLICK is on: left click is B, right click A (input.c poll_merged) +int menu_cursor_dialogue(void); // The same for host UI (the text entry): never blocked. input_block(1) while a text entry is open: input_poll then // reports nothing; input_block(0) when it closes: nothing until all buttons and stick directions are released. void input_poll_ui(uint64_t *buttons, int32_t *lx, int32_t *ly, int32_t *rx, int32_t *ry); diff --git a/runtime/menu_cursor.c b/runtime/menu_cursor.c index a2d8e093..c0f1ba4b 100644 --- a/runtime/menu_cursor.c +++ b/runtime/menu_cursor.c @@ -20,6 +20,11 @@ // // Only while keyboard and mouse are the device used last (input_kbm_last): a gamepad player sees the menus unchanged. // TOTK_MENU_CURSOR (live, default 1): 0 leaves the menus to the keys and the pad. +// +// The same read of the open screens tells input.c when a dialogue box is on screen (menu_cursor_dialogue), where the +// left mouse button presses B (it advances the text and skips its scroll) and the right one A, instead of their +// bindings (Y by default, which opens the dialogue log, and ZL). TOTK_DIALOGUE_CLICK (live, default 1) switches that +// on its own: it does not need the pointer. #include #include #include @@ -166,8 +171,12 @@ static void layout_name(uint64_t scr, char *out, size_t n) { // 1.4.3 constructor keeps). The map has no focus box, so it is found here: the Purah Pad's frame (AppMenuOverlay_00) // with AppMap_00 and the menu's background AppMenuBG_00 open. The Scope opens the frame over AppMap_00 without that // background (Weeping of the Empire's engine/runtime/totk_menu_cursor.cpp census tells them apart the same way). +// The dialogue window (DIALOGUE_SCREEN) has no focus box either: the scan remembers its screen for dialogue_shown. // TOTK_MENU_CURSOR_LOG=1 logs the open screens whenever the set changes. enum { SM_COUNT = 0x8, SM_SCREENS = 0x10 }; +#define DIALOGUE_SCREEN "MessageDialog_00" // the box a character's lines and the game's messages are shown in +#define DIALOGUE_GAP_MS 500 // how long after the box closed a click is still the dialogue's +static uint64_t dialogue_scr; // game thread only static int map_open(void) { uint64_t sm = screen_mgr(); if (!sm) return 0; @@ -187,6 +196,7 @@ static int map_open(void) { pad |= !strcmp(nm, "AppMenuOverlay_00"); map |= !strcmp(nm, "AppMap_00"); bg |= !strcmp(nm, "AppMenuBG_00"); + if (!strcmp(nm, DIALOGUE_SCREEN)) dialogue_scr = scr; if (!verbose) continue; for (const char *c = nm; *c; c++) h = (h ^ (uint8_t)*c) * 1099511628211ull; if (len < sizeof list - 64) len += (size_t)snprintf(list + len, sizeof list - len, "%s%s", len ? " " : "", nm); @@ -196,6 +206,19 @@ static int map_open(void) { if (verbose && h != last && lines < 200) last = h, lines++, rt_log("menu_cursor: open screens: %s", list); return pad && map && bg; } +// The dialogue window is open. Read at every pad read from the screen the last scan found open, so a click follows the +// box without the scan's 100 ms: the game keeps its screens, so the one found once is the one that opens the next time. +// A screen that is no longer that layout (a reload built the screens again) is forgotten until a scan finds it. +static int dialogue_shown(void) { + uint64_t scr = dialogue_scr; + if (!scr) return 0; + if (!game_object(scr, SCR_REQUEST + 1)) { dialogue_scr = 0; return 0; } + if (rd8(scr + SCR_STATE) != SCR_OPENED) return 0; + char nm[48]; + layout_name(scr, nm, sizeof nm); + if (strcmp(nm, DIALOGUE_SCREEN)) { dialogue_scr = 0; return 0; } + return 1; +} static void layout_size(uint64_t scr, float *lw, float *lh) { *lw = 1920, *lh = 1080; uint64_t lyt = rd64(scr + SCR_LAYOUT); @@ -280,15 +303,23 @@ static int gameplay_screen(const char *nm) { static volatile int32_t g_pointer; // a menu has the pointer: input_cursor_allowed releases the capture static volatile int32_t g_map; // the Purah Pad's map is open (not the Scope): the mouse moves its cursor +static volatile int32_t g_dialogue; // a dialogue box is on screen and TOTK_DIALOGUE_CLICK is on: left B, right A int menu_cursor_pointer(void) { return __atomic_load_n(&g_pointer, __ATOMIC_RELAXED); } int menu_cursor_map(void) { return __atomic_load_n(&g_map, __ATOMIC_RELAXED); } +int menu_cursor_dialogue(void) { return __atomic_load_n(&g_dialogue, __ATOMIC_RELAXED); } static int enabled(void) { if (!RT_V143) return 0; const char *v = cfg_get("TOTK_MENU_CURSOR"), *in = cfg_get("TOTK_INPUT"); return !(v && !strcmp(v, "0")) && !(in && !strcmp(in, "none")); } +// The left click in dialogue: its own setting, on with the menu cursor off too +static int dialogue_enabled(void) { + if (!RT_V143) return 0; + const char *in = cfg_get("TOTK_INPUT"); + return cfg_bool("TOTK_DIALOGUE_CLICK") && !(in && !strcmp(in, "none")); +} static void set_pointer(int on) { if (plat_xchg32(&g_pointer, on) == on) return; @@ -325,15 +356,42 @@ void menu_cursor_poll(uint64_t *buttons) { main_lo = MOD_MAIN_BASE, main_hi = MOD_MAIN_BASE + MAIN_SIZE; if (RT_V143) rt_log("menu_cursor: on for 1.4.3 (TOTK_MENU_CURSOR=0 turns it off)"); } - if (!enabled()) { set_pointer(0); __atomic_store_n(&g_map, 0, __ATOMIC_RELAXED); return; } - Focus f = focus_now(); - char nm[48] = ""; - if (f.screen) layout_name(f.screen, nm, sizeof nm); + int cursor = enabled(), talk = dialogue_enabled(); + if (!cursor && !talk) { + set_pointer(0); + __atomic_store_n(&g_map, 0, __ATOMIC_RELAXED); + __atomic_store_n(&g_dialogue, 0, __ATOMIC_RELAXED); + return; + } // The open screens are scanned every 100 ms, not at every pad read: each screen costs memory queries uint64_t now = plat_now_ms(); static uint64_t map_at; - static int map, map_logged; + static int map, map_logged, dialogue_logged; if (!map_at || now - map_at >= 100) map_at = now, map = map_open(); + // Between two lines of a conversation the game closes the box and opens it again, so a click made in that gap still + // counts as dialogue for DIALOGUE_GAP_MS after the box was last open. The first clicks after a conversation fall + // in it too and are B or A, as they are for a player who taps the button through the last line. + // TOTK_MENU_CURSOR_LOG=1 logs how long each gap was. + static uint64_t dialogue_seen; + int box = talk && dialogue_shown(); + if (!talk) dialogue_seen = 0; + if (box) { + static int gap_lines; + const char *e = cfg_get("TOTK_MENU_CURSOR_LOG"); + uint64_t gap = dialogue_seen ? now - dialogue_seen : 0; + if (gap > 30 && gap < 5000 && gap_lines < 100 && e && !strcmp(e, "1")) + gap_lines++, rt_log("menu_cursor: the dialogue box was closed for %llu ms", (unsigned long long)gap); + dialogue_seen = now; + } + int dialogue = box || (dialogue_seen && now - dialogue_seen < DIALOGUE_GAP_MS); + if (dialogue && !dialogue_logged) + dialogue_logged = 1, rt_log("menu_cursor: a dialogue box is open (" DIALOGUE_SCREEN "): left click is B, " + "right click A (TOTK_DIALOGUE_CLICK=0 turns it off)"); + __atomic_store_n(&g_dialogue, dialogue, __ATOMIC_RELAXED); + if (!cursor) { set_pointer(0); __atomic_store_n(&g_map, 0, __ATOMIC_RELAXED); return; } + Focus f = focus_now(); + char nm[48] = ""; + if (f.screen) layout_name(f.screen, nm, sizeof nm); if (map && !map_logged) map_logged = 1, rt_log("menu_cursor: the map is open: the mouse moves its cursor"); __atomic_store_n(&g_map, map, __ATOMIC_RELAXED); // With the gamepad as the last device the menus stay as they are on the console: no pointer, the capture kept. diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 2bed97ed..f0e51ea8 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -867,6 +867,7 @@ static void tab_controls(float scale) { opt_choice("TOTK_MOUSE_MODE", UI_MENU_MOUSE_MODE, mouse_modes, 2, UI_MENU_MOUSE_MODE_DESC); opt_slider("TOTK_MOUSE_SENS", UI_MENU_MOUSE_SENS, 0, 10, UI_MENU_MOUSE_SENS_DESC, 0.1f, "%.1f"); opt_toggle("TOTK_MENU_CURSOR", UI_MENU_MENU_CURSOR, UI_MENU_MENU_CURSOR_DESC); + opt_toggle("TOTK_DIALOGUE_CLICK", UI_MENU_DIALOGUE_CLICK, UI_MENU_DIALOGUE_CLICK_DESC); row_walk_key(); opt_slider("TOTK_WALK_SCALE", UI_MENU_WALK_SCALE, 0.2f, 0.9f, UI_MENU_WALK_SCALE_DESC, 0.01f, "%.2f"); // Analog sticks: one dead zone row per stick, falling back to TOTK_STICK_DEADZONE (both sticks) while unset. With diff --git a/runtime/ui_text.c b/runtime/ui_text.c index 690383b7..ddfce4ea 100644 --- a/runtime/ui_text.c +++ b/runtime/ui_text.c @@ -283,6 +283,8 @@ static const char *const text_en[UI_TEXT_COUNT] = { [UI_MENU_MOUSE_DIRECT] = "Direct", [UI_MENU_MENU_CURSOR] = "Mouse in the game's menus", [UI_MENU_MENU_CURSOR_DESC] = "In the game's own menus (title, inventory, shops, dialogue choices) the pointer shows: the item under it is selected, left click confirms, right click goes back. Only after the mouse or a key was used last, so a gamepad sees the menus unchanged (game 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Clicks in dialogue", + [UI_MENU_DIALOGUE_CLICK_DESC] = "While a dialogue box is open, left click presses B (it continues the text and skips its scroll) and right click presses A, instead of the buttons they are bound to (Y by default, which opens the dialogue log, and ZL). Dialogue choices keep the pointer: left click picks (game 1.4.3).", [UI_MENU_MOUSE_SENS] = "Mouse camera sensitivity", [UI_MENU_MOUSE_SENS_DESC] = "How fast the mouse turns the camera.", [UI_MENU_WALK_KEY] = "Walk key", @@ -763,6 +765,8 @@ static const char *const text_ru[UI_TEXT_COUNT] = { [UI_MENU_MOUSE_DIRECT] = "Прямое", [UI_MENU_MENU_CURSOR] = "Мышь в меню игры", [UI_MENU_MENU_CURSOR_DESC] = "В меню самой игры (заставка, инвентарь, магазины, варианты ответа) появляется указатель: пункт под ним выбирается, левый щелчок подтверждает, правый возвращает назад. Только если последними использовались мышь или клавиатура, поэтому с геймпадом меню не меняются (версия игры 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Щелчки в диалоге", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Пока открыто окно диалога, левый щелчок нажимает B (продолжает текст и пропускает его прокрутку), а правый — A, вместо назначенных им кнопок (по умолчанию Y, она открывает журнал диалога, и ZL). В вариантах ответа по-прежнему работает указатель: левый щелчок выбирает (версия игры 1.4.3).", [UI_MENU_MOUSE_SENS] = "Чувствительность мыши", [UI_MENU_MOUSE_SENS_DESC] = "Как быстро мышь поворачивает камеру.", [UI_MENU_WALK_KEY] = "Клавиша шага", @@ -1416,6 +1420,8 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = { [UI_MENU_MOUSE_DIRECT] = "Direta", [UI_MENU_MENU_CURSOR] = "Mouse nos menus do jogo", [UI_MENU_MENU_CURSOR_DESC] = "Nos menus do próprio jogo (título, inventário, lojas, escolhas de diálogo) o ponteiro aparece: o item sob ele fica selecionado, o clique esquerdo confirma e o direito volta. Só depois de usar o mouse ou uma tecla por último, então com um controle os menus ficam como antes (jogo 1.4.3).", + [UI_MENU_DIALOGUE_CLICK] = "Cliques no diálogo", + [UI_MENU_DIALOGUE_CLICK_DESC] = "Enquanto uma caixa de diálogo está aberta, o clique esquerdo aperta B (continua o texto e pula a rolagem) e o direito aperta A, em vez dos botões aos quais estão atribuídos (Y por padrão, que abre o registro do diálogo, e ZL). As escolhas de diálogo continuam com o ponteiro: o clique esquerdo escolhe (jogo 1.4.3).", [UI_MENU_PROMPTS_MISSING] = "faltam os arquivos dos ícones: execute a instalação de novo", [UI_MENU_PROMPTS_FAILED] = "arquivos dos ícones danificados: execute a instalação de novo", [UI_MENU_PROMPTS_RESTART] = "os ícones mudam após reiniciar", @@ -2045,6 +2051,8 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = { [UI_MENU_MOUSE_DIRECT] = "直接", [UI_MENU_MENU_CURSOR] = "在游戏菜单中使用鼠标", [UI_MENU_MENU_CURSOR_DESC] = "在游戏自身的菜单中(标题、背包、商店、对话选项)显示指针:指针下的项目被选中,左键确认,右键返回。仅在最后使用的是鼠标或键盘时生效,因此使用手柄时菜单保持不变(游戏 1.4.3)。", + [UI_MENU_DIALOGUE_CLICK] = "对话中的鼠标点击", + [UI_MENU_DIALOGUE_CLICK_DESC] = "对话框打开时,鼠标左键按下 B 键(继续对话并跳过文字滚动),右键按下 A 键,而不是它们所绑定的按键(默认为 Y,会打开对话记录;以及 ZL)。对话选项仍使用指针:左键选择(游戏 1.4.3)。", [UI_MENU_PROMPTS_MISSING] = "缺少按键提示文件:请重新运行安装程序", [UI_MENU_PROMPTS_FAILED] = "按键提示文件已损坏:请重新运行安装程序", [UI_MENU_PROMPTS_RESTART] = "按键提示重启后生效", diff --git a/runtime/ui_text.h b/runtime/ui_text.h index 3bed8949..7525eeb8 100644 --- a/runtime/ui_text.h +++ b/runtime/ui_text.h @@ -116,6 +116,7 @@ typedef enum { UI_MENU_STICK_DEADZONE_NOW, UI_MENU_STICK_SENS, UI_MENU_STICK_SENS_DESC, UI_MENU_MOUSE_MODE, UI_MENU_MOUSE_MODE_DESC, UI_MENU_MOUSE_STICK, UI_MENU_MOUSE_DIRECT, UI_MENU_MENU_CURSOR, UI_MENU_MENU_CURSOR_DESC, + UI_MENU_DIALOGUE_CLICK, UI_MENU_DIALOGUE_CLICK_DESC, UI_MENU_MOUSE_SENS, UI_MENU_MOUSE_SENS_DESC, UI_MENU_WALK_KEY, UI_MENU_WALK_KEY_DESC, UI_MENU_WALK_KEY_TAKEN, UI_MENU_WALK_SCALE, UI_MENU_WALK_SCALE_DESC, diff --git a/totk.ini.example b/totk.ini.example index c45a74b2..09860f2a 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -348,6 +348,12 @@ # right click is B. On the map the mouse moves the map's cursor and the scroll wheel zooms. 0 leaves the menus and # the map to the keys and the pad. Changes while the game runs. # menu_cursor = 1 +# The mouse buttons in dialogue, 1.4.3 only: while a dialogue box is open left click presses B (it continues the text +# and skips its scroll) and right click presses A, instead of their bindings (Y by default, which opens the dialogue +# log, and ZL). Dialogue choices keep the pointer, where left click picks. Works with menu_cursor = 0 too. The clicks +# stay B and A for half a second after a box closes, as the game closes the box between two lines of a conversation. +# 0 leaves both buttons on their bindings there. Changes while the game runs. +# dialogue_click = 1 # Mouse camera sensitivity (0 to 10; 0 = no mouse camera and no cursor capture). With mouse_mode = direct, 1 turns the # camera 0.08 degrees per count, the same in every camera mode (about 14.3 cm a turn at 800 DPI). # mouse_sens = 1