mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 14:05:57 +00:00
Use the mouse in the game's menus on 1.4.3
While one of the game's menus has its focus box (the title, the save list, the inventory, Options, shops, dialogue choices), the cursor is released from the mouse camera and shown; the item under the pointer takes the focus as the d-pad would, a left click is A on it and a right click is B. runtime/menu_cursor.c reads eui's screens at each pad read and moves the focus with the writes eui::BoxCursorMgr::moveBoxCursor makes, adapted from Weeping of the Empire's totk_menu_cursor.cpp (1.0.0, MIT), with eui::ScreenMgr's instance placed in 1.4.3 at main+0x3acf960. menu_cursor = 0 turns it off.
This commit is contained in:
1 parent
050563687b
commit
8ff29be86f
12 files changed
+395
-4
No files matched your search
@@ -7,6 +7,9 @@
|
||||
int ikb_foreground(void); // the game window is in front: keys count
|
||||
int ikb_down(int key); // key id (input_map.h KEY_*) held, mouse buttons included
|
||||
int ikb_escape(void); // Esc held (no key id: it belongs to the menu)
|
||||
// The pointer in the client area, 0..1 from its top left; 0 when the window is not in front or the pointer is outside
|
||||
int ikb_pointer(float *nx, float *ny);
|
||||
void ikb_pointer_set(float nx, float ny); // moves the pointer there (the window in front only)
|
||||
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
|
||||
void ikb_cursor_update(void); // what input_cursor_allowed says may have changed
|
||||
|
||||
Reference in new issue
Block a user