gui: allow setting OPTS from r16.

this is used by the caller to specify whether standard dialog buttons are
to be added.
This commit is contained in:
Martin Preuss
2026-05-11 00:42:05 +02:00
parent fc28a57b05
commit 0ec290e29c

View File

@@ -34,6 +34,7 @@
;
; @param Y pointer to MainWindow
; @param X pointer to root window
; @param r16 value for OBJECT_OFFS_OPTS
; @param R21:R20 title ressource
; @param r23:r22 pointer to settings (byte addr for LPM!)
; @return CFLAG set of okay, cleared otherwise
@@ -42,7 +43,6 @@
CDialog_Init:
push r22
push r23
ldi r16, 0 ; OPTS
ldi r17, (WIDGET_PACK_FILLED<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_FILLED<<WIDGET_PACK_VSELF0_BIT) ; PACK
bigcall Dialog_Init
pop r23
@@ -53,9 +53,23 @@ CDialog_Init:
std Y+CDIALOG_OFFS_CONFIG_LO, r22
std Y+CDIALOG_OFFS_CONFIG_HI, r23
CDialog_Init_ret:
ret
; @end
; ---------------------------------------------------------------------------
; @routine CDialog_CreateContent @global
;
; @param Y pointer to MainWindow
; @return CFLAG set of okay, cleared otherwise
; @clobbers any, !Y
CDialog_CreateContent:
; create content
bigcall MainWindow_GetContentWidget ; r19:r18=content window
brcc CDialog_Init_ret
brcc CDialog_CreateContent_ret
mov xl, r18 ; use content window as parent
mov xh, r19
push zl
@@ -75,7 +89,7 @@ CDialog_Init:
pop xl
pop zh
pop zl
CDialog_Init_ret:
CDialog_CreateContent_ret:
ret
; @end