Add EVENT_TYPE_MENU_ACK
This commit is contained in:
parent
05e40bd6cd
commit
7df0521e98
|
@ -8,6 +8,7 @@ const EVENT_TYPE_KEY_UP: 0x00000003
|
||||||
const EVENT_TYPE_MENU_BAR_CLICK: 0x00000004
|
const EVENT_TYPE_MENU_BAR_CLICK: 0x00000004
|
||||||
const EVENT_TYPE_MENU_UPDATE: 0x00000005
|
const EVENT_TYPE_MENU_UPDATE: 0x00000005
|
||||||
const EVENT_TYPE_MENU_CLICK: 0x00000006
|
const EVENT_TYPE_MENU_CLICK: 0x00000006
|
||||||
|
const EVENT_TYPE_MENU_ACK: 0x00000007
|
||||||
const EVENT_TYPE_EMPTY: 0xFFFFFFFF
|
const EVENT_TYPE_EMPTY: 0xFFFFFFFF
|
||||||
|
|
||||||
; block until an event is available
|
; block until an event is available
|
||||||
|
|
|
@ -106,6 +106,7 @@ const EVENT_TYPE_KEY_UP: 0x00000003
|
||||||
const EVENT_TYPE_MENU_BAR_CLICK: 0x00000004
|
const EVENT_TYPE_MENU_BAR_CLICK: 0x00000004
|
||||||
const EVENT_TYPE_MENU_UPDATE: 0x00000005
|
const EVENT_TYPE_MENU_UPDATE: 0x00000005
|
||||||
const EVENT_TYPE_MENU_CLICK: 0x00000006
|
const EVENT_TYPE_MENU_CLICK: 0x00000006
|
||||||
|
const EVENT_TYPE_MENU_ACK: 0x00000007
|
||||||
const EVENT_TYPE_EMPTY: 0xFFFFFFFF
|
const EVENT_TYPE_EMPTY: 0xFFFFFFFF
|
||||||
|
|
||||||
; keys
|
; keys
|
||||||
|
|
2
main.asm
2
main.asm
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
const FOX32ROM_VERSION_MAJOR: 0
|
const FOX32ROM_VERSION_MAJOR: 0
|
||||||
const FOX32ROM_VERSION_MINOR: 5
|
const FOX32ROM_VERSION_MINOR: 5
|
||||||
const FOX32ROM_VERSION_PATCH: 2
|
const FOX32ROM_VERSION_PATCH: 3
|
||||||
|
|
||||||
const SYSTEM_STACK: 0x01FFF800
|
const SYSTEM_STACK: 0x01FFF800
|
||||||
const BACKGROUND_COLOR: 0xFF674764
|
const BACKGROUND_COLOR: 0xFF674764
|
||||||
|
|
16
menu.asm
16
menu.asm
|
@ -239,7 +239,8 @@ menu_update_event_clicked:
|
||||||
call get_mouse_button
|
call get_mouse_button
|
||||||
bts r0, 2
|
bts r0, 2
|
||||||
ifnz jmp menu_update_event_clicked
|
ifnz jmp menu_update_event_clicked
|
||||||
;div r2, 16 ; mouse Y / 16
|
|
||||||
|
; add an EVENT_TYPE_MENU_CLICK event
|
||||||
mov r1, r8 ; event parameter 0: pointer to menu bar root struct
|
mov r1, r8 ; event parameter 0: pointer to menu bar root struct
|
||||||
mov r2, r9 ; event parameter 1: selected root menu item
|
mov r2, r9 ; event parameter 1: selected root menu item
|
||||||
mov r3, r10 ; event parameter 2: selected menu item
|
mov r3, r10 ; event parameter 2: selected menu item
|
||||||
|
@ -249,8 +250,17 @@ menu_update_event_clicked:
|
||||||
mov r7, 0
|
mov r7, 0
|
||||||
mov r0, EVENT_TYPE_MENU_CLICK
|
mov r0, EVENT_TYPE_MENU_CLICK
|
||||||
call new_event
|
call new_event
|
||||||
mov r0, r1
|
|
||||||
call close_menu
|
; add an EVENT_TYPE_MENU_ACK event
|
||||||
|
mov r1, 0
|
||||||
|
mov r2, 0
|
||||||
|
mov r3, 0
|
||||||
|
mov r4, 0
|
||||||
|
mov r5, 0
|
||||||
|
mov r6, 0
|
||||||
|
mov r7, 0
|
||||||
|
mov r0, EVENT_TYPE_MENU_ACK
|
||||||
|
call new_event
|
||||||
jmp menu_update_event_end_no_add
|
jmp menu_update_event_end_no_add
|
||||||
menu_update_event_end_add:
|
menu_update_event_end_add:
|
||||||
; readd the event_type_menu_update event to the event queue
|
; readd the event_type_menu_update event to the event queue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user