gui: emit signal when dialog button clicked.

This commit is contained in:
Martin Preuss
2026-05-08 12:31:53 +02:00
parent db97cf9644
commit 781478d2d2

View File

@@ -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