gui: implemented DlgLightConns_OnCmdLight and DlgLightConns_OnDlgEndLight.
This commit is contained in:
@@ -514,6 +514,37 @@ DlgLightConns_OnDlgEndMotion2_leave:
|
|||||||
; @clobbers any, !Y
|
; @clobbers any, !Y
|
||||||
|
|
||||||
DlgLightConns_OnCmdLight:
|
DlgLightConns_OnCmdLight:
|
||||||
|
push yl
|
||||||
|
push yh
|
||||||
|
ldd zl, Y+DLGLIGHTCONNS_OFFS_SETTINGS_LO
|
||||||
|
ldd zh, Y+DLGLIGHTCONNS_OFFS_SETTINGS_HI
|
||||||
|
bigcall Widget_GetApp ; R19:R18=gui
|
||||||
|
mov yl, r18
|
||||||
|
mov yh, r19
|
||||||
|
ldi r20, LOW(RESSOURCE_TXT_LEDBRIGHTNESSSRC)
|
||||||
|
ldi r21, HIGH(RESSOURCE_TXT_LEDBRIGHTNESSSRC)
|
||||||
|
push zl
|
||||||
|
push zh
|
||||||
|
bigcall DlgNodeValueId_new
|
||||||
|
pop zh
|
||||||
|
pop zl
|
||||||
|
|
||||||
|
ldi r16, DLGLIGHTCONNS_SEL_DLG_LIGHT
|
||||||
|
std Y+OBJECT_OFFS_SELECTOR, r16
|
||||||
|
; set values
|
||||||
|
ldd xl, Z+LIGHTSETTINGS_OFFS_BSOURCE_NODEADDR
|
||||||
|
clr xh
|
||||||
|
bigcall DlgNodeValueId_SetNodeAddr
|
||||||
|
ldd xl, Z+LIGHTSETTINGS_OFFS_BSOURCE_VALUEID
|
||||||
|
clr xh
|
||||||
|
bigcall DlgNodeValueId_SetValueId
|
||||||
|
|
||||||
|
mov xl, yl
|
||||||
|
mov xh, yh
|
||||||
|
pop yh
|
||||||
|
pop yl
|
||||||
|
|
||||||
|
rcall dlgLightConnsEnterSubDialog
|
||||||
sec
|
sec
|
||||||
ret
|
ret
|
||||||
; @end
|
; @end
|
||||||
@@ -527,6 +558,26 @@ DlgLightConns_OnCmdLight:
|
|||||||
; @clobbers any, !Y
|
; @clobbers any, !Y
|
||||||
|
|
||||||
DlgLightConns_OnDlgEndLight:
|
DlgLightConns_OnDlgEndLight:
|
||||||
|
cpi xl, DIALOG_RESULT_OK
|
||||||
|
brne DlgLightConns_OnDlgEndLight_leave
|
||||||
|
|
||||||
|
; get values
|
||||||
|
ldd zl, Y+DLGLIGHTCONNS_OFFS_SETTINGS_LO
|
||||||
|
ldd zh, Y+DLGLIGHTCONNS_OFFS_SETTINGS_HI
|
||||||
|
push yl
|
||||||
|
push yh
|
||||||
|
ldd r16, Y+DLGLIGHTCONNS_OFFS_CURRDLG_LO
|
||||||
|
ldd yh, Y+DLGLIGHTCONNS_OFFS_CURRDLG_HI
|
||||||
|
mov yl, r16
|
||||||
|
bigcall DlgNodeValueId_GetNodeAddr
|
||||||
|
std Z+LIGHTSETTINGS_OFFS_BSOURCE_NODEADDR, r18
|
||||||
|
bigcall DlgNodeValueId_GetValueId
|
||||||
|
std Z+LIGHTSETTINGS_OFFS_BSOURCE_VALUEID, r18
|
||||||
|
pop yh
|
||||||
|
pop yl
|
||||||
|
|
||||||
|
DlgLightConns_OnDlgEndLight_leave:
|
||||||
|
rcall dlgLightConnsLeaveSubDialog
|
||||||
sec
|
sec
|
||||||
ret
|
ret
|
||||||
; @end
|
; @end
|
||||||
|
|||||||
Reference in New Issue
Block a user