From d07f411e5103d9af8763bb9fe09649642b8f391f Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 11 May 2026 11:55:16 +0200 Subject: [PATCH] gui: implement DlgLightConns_OnCmdMotion2 and DlgLightConns_OnDlgEndMotion2 --- avr/modules/lcd2/gui/aqhome/d_light_conns.asm | 167 +++++++++++++----- 1 file changed, 118 insertions(+), 49 deletions(-) diff --git a/avr/modules/lcd2/gui/aqhome/d_light_conns.asm b/avr/modules/lcd2/gui/aqhome/d_light_conns.asm index 499ebef..3ab8c8d 100644 --- a/avr/modules/lcd2/gui/aqhome/d_light_conns.asm +++ b/avr/modules/lcd2/gui/aqhome/d_light_conns.asm @@ -254,6 +254,65 @@ dlgLightConnsGetValue_ret: +; --------------------------------------------------------------------------- +; @routine dlgLightConnsEnterSubDialog +; @param Y pointer to dialog +; @param X pointer to new dialog to enter +; @clobbers any, !Y + +dlgLightConnsEnterSubDialog: + std Y+DLGLIGHTCONNS_OFFS_CURRDLG_LO, xl + std Y+DLGLIGHTCONNS_OFFS_CURRDLG_HI, xh + + adiw xh:xl, OBJECT_OFFS_TARGET_LO + st X+, yl + st X, yh + sbiw xh:xl, (OBJECT_OFFS_TARGET_LO+1) + + push yl + push yh + bigcall Widget_GetApp ; R19:R18=gui (none) + mov yl, r18 + mov yh, r19 + bigcall GuiApp_EnterWindow + pop yh + pop yl + ret +; @end + + + +; --------------------------------------------------------------------------- +; @routine dlgLightConnsLeaveSubDialog +; @param Y pointer to dialog +; @clobbers any, !Y + +dlgLightConnsLeaveSubDialog: + ; leave sub-dialog + push yl + push yh + bigcall Widget_GetApp ; R19:R18=gui + mov yl, r18 + mov yh, r19 + bigcall GuiApp_LeaveWindow + pop yh + pop yl + + ; mark sub-dialog for destruction + ldd xl, Y+DLGLIGHTCONNS_OFFS_CURRDLG_LO + ldd xh, Y+DLGLIGHTCONNS_OFFS_CURRDLG_HI + clr r16 + std Y+DLGLIGHTCONNS_OFFS_CURRDLG_LO, r16 + std Y+DLGLIGHTCONNS_OFFS_CURRDLG_HI, r16 + adiw xh:xl, OBJECT_OFFS_FLAGS + ld r16, X + sbr r16, (1<