mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 20:25:57 +00:00
Zoom the map with the scroll wheel
On the map the mouse moves the cursor, so it had no way to zoom: the zoom is the right stick's y, which only the keys and a pad reached. While the map is open, each wheel notch is now a full-tilt push of that stick for 100 ms with 50 ms of neutral after it (a turn away from the player zooms in). A fast scroll's notches wait their turn, at most four, and a turn the other way drops them. The wheel stays unbound elsewhere. The back ends count the notches while the cursor is captured (input_win.c from raw input's usButtonData, input_sdl.c from SDL_EVENT_MOUSE_WHEEL), keeping a high-resolution wheel's part of a notch (ikb_wheel_take). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5b4b300a1e
commit
21c65ec065
6 files changed
+70
-6
No files matched your search
@@ -13,6 +13,8 @@ void ikb_pointer_set(float nx, float ny); // moves the pointer there (the wind
|
||||
int ikb_captured(void); // the cursor is captured for the mouse camera
|
||||
void ikb_mouse_take(int32_t *dx, int32_t *dy); // raw mouse motion since the last call, in counts
|
||||
uint32_t ikb_mouse_travel(void); // raw counts the mouse moved in total (|dx| + |dy|), captured or not
|
||||
int32_t ikb_wheel_take(void); // whole wheel notches turned while captured since the last call (+ away
|
||||
// from the player); a high-resolution wheel's part of a notch is kept
|
||||
void ikb_cursor_update(void); // what input_cursor_allowed says may have changed
|
||||
void ikb_menu_closed(void); // the menu closed: a capture that Esc gave up comes back
|
||||
|
||||
|
||||
Reference in new issue
Block a user