launcher: Add "Quit Launcher" menu item
This commit is contained in:
parent
ce094891ce
commit
2997fb7c85
|
@ -45,6 +45,11 @@ event_loop:
|
||||||
call yield_task
|
call yield_task
|
||||||
jmp event_loop
|
jmp event_loop
|
||||||
|
|
||||||
|
quit_launcher:
|
||||||
|
call disable_menu_bar
|
||||||
|
call end_current_task
|
||||||
|
jmp hang
|
||||||
|
|
||||||
allocate_error:
|
allocate_error:
|
||||||
mov r0, allocate_error_str
|
mov r0, allocate_error_str
|
||||||
mov r1, 16
|
mov r1, 16
|
||||||
|
|
|
@ -49,11 +49,16 @@ system_menu_click_event:
|
||||||
; r2 contains the clicked root menu
|
; r2 contains the clicked root menu
|
||||||
; r3 contains the clicked menu item
|
; r3 contains the clicked menu item
|
||||||
|
|
||||||
|
; about
|
||||||
cmp r3, 0
|
cmp r3, 0
|
||||||
ifz jmp about_dialog
|
ifz jmp about_dialog
|
||||||
|
|
||||||
; shut down
|
; quit launcher
|
||||||
cmp r3, 1
|
cmp r3, 1
|
||||||
|
ifz jmp quit_launcher
|
||||||
|
|
||||||
|
; shut down
|
||||||
|
cmp r3, 2
|
||||||
ifz icl
|
ifz icl
|
||||||
ifz halt
|
ifz halt
|
||||||
|
|
||||||
|
@ -68,9 +73,10 @@ menu_items_system_name:
|
||||||
menu_items_launcher_name:
|
menu_items_launcher_name:
|
||||||
data.8 8 data.str "Launcher" data.8 0x00 ; text length, text, null-terminator
|
data.8 8 data.str "Launcher" data.8 0x00 ; text length, text, null-terminator
|
||||||
menu_items_system_list:
|
menu_items_system_list:
|
||||||
data.8 2 ; number of items
|
data.8 3 ; number of items
|
||||||
data.8 11 ; menu width (usually longest item + 2)
|
data.8 15 ; menu width (usually longest item + 2)
|
||||||
data.8 5 data.str "About" data.8 0x00 ; text length, text, null-terminator
|
data.8 5 data.str "About" data.8 0x00 ; text length, text, null-terminator
|
||||||
|
data.8 13 data.str "Quit Launcher" data.8 0x00 ; text length, text, null-terminator
|
||||||
data.8 9 data.str "Shut Down" data.8 0x00 ; text length, text, null-terminator
|
data.8 9 data.str "Shut Down" data.8 0x00 ; text length, text, null-terminator
|
||||||
menu_items_launcher_list: ; reserve enough room for up to 28 items
|
menu_items_launcher_list: ; reserve enough room for up to 28 items
|
||||||
data.8 1 ; number of items
|
data.8 1 ; number of items
|
||||||
|
|
Loading…
Reference in New Issue
Block a user