From a10c546a06764b602e89e8242db50cc39fa2f184 Mon Sep 17 00:00:00 2001 From: itaskaev2 <165683571+itaskaev2@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:23:48 +0100 Subject: [PATCH 1/4] Scroll with the mouse wheel in the game's menus and along the D-pad strips The wheel did nothing outside the map. Now each notch is one step of the stick a gamepad player would move: in a menu with the game's focus box (the inventory, shops, Options, the save list) the focus moves up or down, and while a D-pad strip (weapons, shields, bows, materials) is held open the choice moves left or right. The strip has no focus box while it is held, so it is found by its open screen, ShortCut_00, as the map is. The wheel now also counts while the cursor is released over the window, where the menus have the pointer. Input scripts take WHEEL lines and a recording writes them, and a script's one-shot MOUSE or WHEEL line goes in at the first poll at or after its tick instead of being lost when a poll skips that tick. Co-Authored-By: Claude Opus 5.5 --- docs/controls.md | 7 ++- runtime/input.c | 107 ++++++++++++++++++++++++++++++++---------- runtime/input.h | 5 ++ runtime/input_sdl.c | 6 ++- runtime/input_win.c | 11 +++-- runtime/input_wsys.h | 5 +- runtime/menu_cursor.c | 23 +++++++-- 7 files changed, 127 insertions(+), 37 deletions(-) diff --git a/docs/controls.md b/docs/controls.md index 0263fbf4..f110a86d 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -174,7 +174,8 @@ The horizontal quick lists (D-pad up/left/right: materials, shields and weapons) with at least 32 ms of neutral between them. At sensitivity 1, 32 horizontal counts request a step; a large flick cannot queue continued scrolling after the mouse stops. Vertical movement is ignored in these lists. Switching or releasing a selector resets its cursor/step state without sending the last movement to the camera. Selector input is -not consumed by the direct camera or Ultrahand hooks. +not consumed by the direct camera or Ultrahand hooks. The scroll wheel steps these lists too: each notch is one step, +away from you to the left, towards you to the right. To detach a fused part from what Ultrahand holds, shake the mouse left and right, or press G (`bind_SHAKE`). A press swings the right stick left and right for 0.8 s, holding the key keeps it swinging. With `mouse_mode = direct` a shake of the mouse while Ultrahand holds an object swings the right stick with it: once the swings (10 degrees of camera turn @@ -199,7 +200,7 @@ The stick direction bits (`StickLLeft` to `StickRDown`) are derived from the sti ## Mouse in the game's menus -On game 1.4.3, while one of the game's menus has its focus box (the frame the d-pad moves: the title, the save list, the inventory and its System tab, Options, shops, dialogue choices), the cursor is released from the mouse camera and shown in the middle of the window. A focus gap of up to 300 ms (a tab switch, a popup opening: the game drops the focus box for a frame or two) keeps the pointer where it is instead of capturing and centring it again. The item under the pointer takes the focus as if the d-pad had moved there, with the game's highlight, sound and description; a left click is A on it, a right click is B. The middle and side mouse buttons keep their bindings (bound to L and R they turn the tabs), and T presses Y (sort). The keys and the pad keep working, and the focus moves only when the pointer moves. This happens only while the keyboard and mouse are the device used last: after a gamepad button press or a stick pushed past half way the menus are as on the console, with no pointer, until the mouse moves or a key is pressed (`input_kbm_last` in `runtime/input.c`). The ability wheel, the d-pad strips, Autobuild and the Purah Pad's camera stay gameplay: the mouse keeps the camera there. The map has no focus box; it is found in `eui::ScreenMgr`'s list of open screens (every 100 ms: the Purah Pad's frame `AppMenuOverlay_00` with `AppMap_00` and the menu background `AppMenuBG_00`), and there the mouse moves the map's cursor as the left stick does, with the cursor still captured, and the scroll wheel zooms: each notch is a full-tilt push of the right stick (the map's zoom) for 100 ms with 50 ms of neutral after it, up (in) for a turn away from you; a fast scroll's notches wait their turn (at most four), a turn the other way drops them. The Scope opens the same map screen without the menu background and keeps the mouse camera. When the menu closes the cursor is captured again. +On game 1.4.3, while one of the game's menus has its focus box (the frame the d-pad moves: the title, the save list, the inventory and its System tab, Options, shops, dialogue choices), the cursor is released from the mouse camera and shown in the middle of the window. A focus gap of up to 300 ms (a tab switch, a popup opening: the game drops the focus box for a frame or two) keeps the pointer where it is instead of capturing and centring it again. The item under the pointer takes the focus as if the d-pad had moved there, with the game's highlight, sound and description; a left click is A on it, a right click is B. The middle and side mouse buttons keep their bindings (bound to L and R they turn the tabs), and T presses Y (sort). The scroll wheel moves the focus up and down, one step a notch (a full-tilt push of the left stick for 70 ms with 50 ms of neutral after it, up for a turn away from you), so a long list of items scrolls without moving the pointer; `menu_cursor = 0` turns this off with the pointer. The keys and the pad keep working, and the focus moves with the pointer only when the pointer moves. This happens only while the keyboard and mouse are the device used last: after a gamepad button press or a stick pushed past half way the menus are as on the console, with no pointer, until the mouse moves or a key is pressed (`input_kbm_last` in `runtime/input.c`). The ability wheel, the d-pad strips, Autobuild and the Purah Pad's camera stay gameplay: the mouse keeps the camera there. The map has no focus box; it is found in `eui::ScreenMgr`'s list of open screens (every 100 ms: the Purah Pad's frame `AppMenuOverlay_00` with `AppMap_00` and the menu background `AppMenuBG_00`), and there the mouse moves the map's cursor as the left stick does, with the cursor still captured, and the scroll wheel zooms: each notch is a full-tilt push of the right stick (the map's zoom) for 100 ms with 50 ms of neutral after it, up (in) for a turn away from you; a fast scroll's notches wait their turn (at most four), a turn the other way drops them. The Scope opens the same map screen without the menu background and keeps the mouse camera. When the menu closes the cursor is captured again. `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. @@ -220,6 +221,8 @@ Bridges that output a ViGEm DualShock 4 (ProCon2Windows, connectyourpro as teste @