From cd0d74d491e1ed6b9cba0c1024041c0b9becaa7b Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 11 May 2026 00:40:28 +0200 Subject: [PATCH] MainWindow: no longer auto-create content widget will be called later by deriving classes upon SHOW signal to save on SDRAM. --- avr/modules/lcd2/gui/base/mainwindow.asm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/avr/modules/lcd2/gui/base/mainwindow.asm b/avr/modules/lcd2/gui/base/mainwindow.asm index c361d99..c01a8c2 100644 --- a/avr/modules/lcd2/gui/base/mainwindow.asm +++ b/avr/modules/lcd2/gui/base/mainwindow.asm @@ -14,9 +14,10 @@ ; *************************************************************************** ; defines -.equ MAINWINDOW_OFFS_BEGIN = VLAYOUT_SIZE -; no data for now -.equ MAINWINDOW_SIZE = MAINWINDOW_OFFS_BEGIN+0 +.equ MAINWINDOW_OFFS_BEGIN = VLAYOUT_SIZE +.equ MAINWINDOW_OFFS_PREVWIN_LO = MAINWINDOW_OFFS_BEGIN+0 +.equ MAINWINDOW_OFFS_PREVWIN_HI = MAINWINDOW_OFFS_BEGIN+1 +.equ MAINWINDOW_SIZE = MAINWINDOW_OFFS_BEGIN+2 ; index of sub-windows @@ -96,7 +97,6 @@ MainWindow_Init: ; create sub widgets rcall mainWindowCreateTitleWidget - rcall mainWindowCreateContentWidget ret ; @end @@ -221,13 +221,13 @@ mainWindowCreateTitleWidget_done: ; --------------------------------------------------------------------------- -; @routine mainWindowCreateContentWidget +; @routine MainWindow_CreateContentWidget ; ; @param Y address of main window widget -; @param r21:r20 ressource id for title ; @return CFLAG set of okay, cleared otherwise +; @return r19:r18 pointer to created widget -mainWindowCreateContentWidget: +MainWindow_CreateContentWidget: ; create content widget push yl push yh @@ -237,13 +237,15 @@ mainWindowCreateContentWidget: ldi r17, (WIDGET_PACK_FILLED<