diff --git a/avr/modules/lcd2/gui2/base/mainwindow.asm b/avr/modules/lcd2/gui2/base/mainwindow.asm index a5e2a45..25353ac 100644 --- a/avr/modules/lcd2/gui2/base/mainwindow.asm +++ b/avr/modules/lcd2/gui2/base/mainwindow.asm @@ -120,6 +120,31 @@ MainWindow_GetContentWidget: +; --------------------------------------------------------------------------- +; @routine MainWindow_GetContentWidget @global +; +; @param Y address of widget +; @param X parent widget (if any) +; @return CFLAG set, if found, cleared otherwise +; @return r19:r18 resulting object +; @clobbers r16 + +MainWindow_GetFirstChildOfContentWidget: + push yl + push yh + bigcall MainWindow_GetContentWidget ; r19:r18=content window (R16) + brcc MainWindow_GetFirstChildOfContentWidget_popRet + mov yl, r18 + mov yh, r19 + bigcall OBJ_GetFirstChild ; get first child +MainWindow_GetFirstChildOfContentWidget_popRet: + pop yh + pop yl + ret +; @end + + + ; ***************************************************************************