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
@@ -22,6 +22,10 @@ int input_direct_mouse_shake(int allow, int32_t out[2]);
|
||||
// Consume direct mouse counts, including one-shot MOUSE events from an input script. enabled=0 discards scripted
|
||||
// counts while leaving the real mouse for menu input. Live counts require cursor capture and foreground focus.
|
||||
void input_direct_mouse_sample(int enabled, int32_t *dx, int32_t *dy);
|
||||
// menu_cursor.c: the pointer in the game's menus (1.4.3). poll: once per pad read, adds a click's A or B; pointer: a
|
||||
// menu has the pointer, so the mouse camera's capture is released
|
||||
void menu_cursor_poll(uint64_t *buttons);
|
||||
int menu_cursor_pointer(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);
|
||||
|
||||
Reference in new issue
Block a user