gui: emit signal when dialog button clicked.
This commit is contained in:
@@ -24,6 +24,9 @@
|
|||||||
.equ DIALOG_SEL_ABORTBUTTON = 2
|
.equ DIALOG_SEL_ABORTBUTTON = 2
|
||||||
.equ DIALOG_SEL_NEXTFREE = 3
|
.equ DIALOG_SEL_NEXTFREE = 3
|
||||||
|
|
||||||
|
.equ DIALOG_RESULT_OK = 0
|
||||||
|
.equ DIALOG_RESULT_ABORTED = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ***************************************************************************
|
; ***************************************************************************
|
||||||
@@ -89,18 +92,38 @@ Dialog_AddDefaultButtons_ret:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ***************************************************************************
|
; ***************************************************************************
|
||||||
; signal handlers
|
; signal handlers
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; @routine Dialog_OnOk @global
|
||||||
|
;
|
||||||
|
; @param Y pointer to dialog
|
||||||
|
; @clobbers any, !Y
|
||||||
|
|
||||||
Dialog_OnOk:
|
Dialog_OnOk:
|
||||||
; TODO: emit signal
|
ldi r16, WIDGET_SIGNAL_DIALOG_END
|
||||||
|
ldi xl, LOW(DIALOG_RESULT_OK)
|
||||||
|
ldi xh, HIGH(DIALOG_RESULT_OK)
|
||||||
|
bigcall OBJ_EmitSignal
|
||||||
sec
|
sec
|
||||||
ret
|
ret
|
||||||
; @end
|
; @end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; @routine Dialog_OnOAbort @global
|
||||||
|
;
|
||||||
|
; @param Y pointer to dialog
|
||||||
|
; @clobbers any, !Y
|
||||||
|
|
||||||
Dialog_OnAbort:
|
Dialog_OnAbort:
|
||||||
; TODO: emit signal
|
ldi r16, WIDGET_SIGNAL_DIALOG_END
|
||||||
|
ldi xl, LOW(DIALOG_RESULT_ABORTED)
|
||||||
|
ldi xh, HIGH(DIALOG_RESULT_ABORTED)
|
||||||
|
bigcall OBJ_EmitSignal
|
||||||
sec
|
sec
|
||||||
ret
|
ret
|
||||||
; @end
|
; @end
|
||||||
|
|||||||
Reference in New Issue
Block a user