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