add ressources, use signals for GuiApp.
makes it easier to extend.
This commit is contained in:
@@ -82,7 +82,9 @@ GuiCntlr_ShowApp_changed:
|
||||
mov zh, r19
|
||||
or r18, r19
|
||||
breq GuiCntlr_ShowApp_l1
|
||||
bigcall GuiApp_Hide
|
||||
ldi r16, WIDGET_SIGNAL_HIDE
|
||||
clr r17
|
||||
bigcall OBJ_HandleSignal
|
||||
GuiCntlr_ShowApp_l1:
|
||||
pop zh
|
||||
pop zl
|
||||
@@ -90,7 +92,9 @@ GuiCntlr_ShowApp_l1:
|
||||
mov r16, zl
|
||||
or r16, zh
|
||||
breq GuiCntlr_ShowApp_l2
|
||||
bigcall GuiApp_Show
|
||||
ldi r16, WIDGET_SIGNAL_SHOW
|
||||
clr r17
|
||||
bigcall OBJ_HandleSignal
|
||||
GuiCntlr_ShowApp_l2:
|
||||
pop zh
|
||||
pop zl
|
||||
@@ -139,7 +143,9 @@ guiCntrlCheckTouch:
|
||||
mov r16, zl
|
||||
or r16, zh
|
||||
breq guiCntrlCheckTouch_l1
|
||||
bigcall GuiApp_Touch
|
||||
ldi r16, WIDGET_SIGNAL_TOUCH
|
||||
clr r17
|
||||
bigcall OBJ_HandleSignal
|
||||
guiCntrlCheckTouch_l1:
|
||||
pop zh
|
||||
pop zl
|
||||
@@ -163,7 +169,10 @@ guiCntrlSendTimer_loop:
|
||||
mov zh, r19
|
||||
or r18, r19
|
||||
breq guiCntrlSendTimer_loopEnd
|
||||
bigcall GuiApp_Every100ms
|
||||
; let child handle timer signal
|
||||
ldi r16, OBJECT_SIGNAL_TIMER
|
||||
clr r17
|
||||
bigcall OBJ_HandleSignal
|
||||
bigcall OBJ_GetNext
|
||||
rjmp guiCntrlSendTimer_loop
|
||||
guiCntrlSendTimer_loopEnd:
|
||||
@@ -220,34 +229,7 @@ GuiCntlr_OnCreate:
|
||||
; @clobbers any, !Z
|
||||
|
||||
GuiCntlr_OnRaise:
|
||||
lds r18, guicntl_current_app
|
||||
lds r19, guicntl_current_app+1
|
||||
|
||||
cp r18, xl
|
||||
brne GuiCntlr_OnRaise_changed
|
||||
cp r19, xh
|
||||
breq GuiCntlr_OnRaise_secRet ; already current app
|
||||
GuiCntlr_OnRaise_changed:
|
||||
push zl
|
||||
push zh
|
||||
push xl
|
||||
push xh
|
||||
mov zl, r18
|
||||
mov zh, r19
|
||||
or r18, r19
|
||||
breq GuiCntlr_OnRaise_l1
|
||||
bigcall GuiApp_Hide
|
||||
GuiCntlr_OnRaise_l1:
|
||||
pop zh
|
||||
pop zl
|
||||
mov r16, zl
|
||||
or r16, zh
|
||||
breq GuiCntlr_OnRaise_l2
|
||||
bigcall GuiApp_Show
|
||||
GuiCntlr_OnRaise_l2:
|
||||
pop zh
|
||||
pop zl
|
||||
GuiCntlr_OnRaise_secRet:
|
||||
rcall GuiCntlr_ShowApp
|
||||
sec
|
||||
ret
|
||||
; @end
|
||||
|
||||
Reference in New Issue
Block a user