Prev: 35459 Up: Map Next: 35525
35497: Load A with (zero-based) index of selected menu item
Used by the routine at 35296.
Output
A Selected menu item index (zero-based)
35497 CALL 35386 Wait for fire button / key to be released
35500 LD BC,(23476) Load BC with absolute coordinates (characters) of start of row of text of interest in menu
35504 LD A,(23456) Load C with initial y-coordinate of top of hand cursor relative to current window (characters)...
35507 LD C,A ...
35508 LD A,(23494) Load A with y-coordinate of top edge of current window (characters)...
35511 ADD A,C ...add C...
35512 INC A ...and add 1 to get absolute y-coordinate of first item in menu
35513 LD C,A Store y-coordinate in C
35514 LD A,B Load A with y-coordinate of row of text of interest in menu
35515 SUB C Subtract absolute y-coordinate of first item in menu to give zero-based index of selected item
35516 PUSH AF Store AF (A = selected item index)
35517 LD A,(23479) Load A with current y-coordinate of hand cursor relative to its starting position (pixels)...
35520 CALL 35525 ...and use to de-highlight selected menu item
35523 POP AF Restore AF (A = selected item index)
35524 RET Return
Prev: 35459 Up: Map Next: 35525