gui: use CDialog_GetChildValue
This commit is contained in:
@@ -163,12 +163,12 @@ DlgNodeValueId_toGui:
|
||||
ldd xl, Y+DLGNODEVALUEID_OFFS_NODEADDR
|
||||
clr xh
|
||||
ldi r16, DLGNODEVALUEID_SEL_NODEADDR
|
||||
rcall dlgNodeValueIdSetChildValue
|
||||
bigcall CDialog_SetChildValue
|
||||
; save value id
|
||||
ldd xl, Y+DLGNODEVALUEID_OFFS_VALUEID
|
||||
clr xh
|
||||
ldi r16, DLGNODEVALUEID_SEL_VALUEID
|
||||
rjmp dlgNodeValueIdSetChildValue
|
||||
bigjmp CDialog_SetChildValue
|
||||
ret
|
||||
; @end
|
||||
|
||||
@@ -182,69 +182,17 @@ DlgNodeValueId_toGui:
|
||||
|
||||
DlgNodeValueId_fromGui:
|
||||
ldi r16, DLGNODEVALUEID_SEL_NODEADDR
|
||||
rcall dlgNodeValueIdGetChildValue
|
||||
bigcall CDialog_GetChildValue
|
||||
std Y+DLGNODEVALUEID_OFFS_NODEADDR, r18
|
||||
|
||||
ldi r16, DLGNODEVALUEID_SEL_VALUEID
|
||||
rcall dlgNodeValueIdGetChildValue
|
||||
bigcall CDialog_GetChildValue
|
||||
std Y+DLGNODEVALUEID_OFFS_VALUEID, r18
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine dlgNodeValueIdSetChildValue
|
||||
;
|
||||
; @param Y pointer to dialog
|
||||
; @param X new value
|
||||
; @param R16 selector of child to set value to
|
||||
; @clobbers any, !Y, !Z
|
||||
|
||||
dlgNodeValueIdSetChildValue:
|
||||
bigcall CDialog_GetChildBySelector ; r19:r18=result (R16-R19)
|
||||
brcc dlgNodeValueIdSetChildValue_ret
|
||||
push yl
|
||||
push yh
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall Widget_SetCurrentValue
|
||||
pop yh
|
||||
pop yl
|
||||
dlgNodeValueIdSetChildValue_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine dlgNodeValueIdGetChildValue
|
||||
;
|
||||
; @param Y pointer to dialog
|
||||
; @param R16 selector of child to set value to
|
||||
; @clobbers any, !Y, !Z
|
||||
|
||||
dlgNodeValueIdGetChildValue:
|
||||
bigcall CDialog_GetChildBySelector ; r19:r18=result (R16-R19)
|
||||
brcc dlgNodeValueIdGetChildValue_retZero
|
||||
push yl
|
||||
push yh
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall Widget_GetCurrentValue
|
||||
pop yh
|
||||
pop yl
|
||||
brcs dlgNodeValueIdGetChildValue_ret
|
||||
dlgNodeValueIdGetChildValue_retZero:
|
||||
clr r18
|
||||
clr r19
|
||||
dlgNodeValueIdGetChildValue_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user