gui: removed CWidget_GetChildBySelector (use OBJ_GetChildBySelector).

This commit is contained in:
Martin Preuss
2026-05-08 00:30:10 +02:00
parent 31dca13123
commit 5513878b24
2 changed files with 9 additions and 56 deletions

View File

@@ -91,46 +91,6 @@ CWidget_Create_ret:
; ---------------------------------------------------------------------------
; @routine CWidget_GetChildBySelector
;
; @param Y pointer to widget created by @ref CWidget_Create
; @param Z pointer to dialog configuration
; @param r16 selector to search for
; @return CFLAG set if widget found, cleared otherwise
; @return r19:r18 resulting widget
; @clobbers R16, R18, R19
CWidget_GetChildBySelector:
push zl
push zh
adiw zh:zl, CWIDGETCFG_HEADER_SIZE
; determine child index
clr r18
CWidget_GetChildBySelector_loop:
lpm r19, Z ; CWIDGETCFG_OFFS_WIDGET_TYPE
tst r19
clc
breq CWidget_GetChildBySelector_popRet
adiw zh:zl, CWIDGETCFG_OFFS_WIDGET_SELECTOR
lpm r19, Z
sbiw zh:zl, CWIDGETCFG_OFFS_WIDGET_SELECTOR
cp r19, r16
breq CWidget_GetChildBySelector_found
inc r18
adiw zh:zl, CWIDGETCFG_WIDGET_SIZE
rjmp CWidget_GetChildBySelector_loop
CWidget_GetChildBySelector_found:
mov r16, r18
bigcall OBJ_GetChildAt ; (r16)
CWidget_GetChildBySelector_popRet:
pop zh
pop zl
ret
; @end
; ---------------------------------------------------------------------------
; @routine CWidget_CreateChildWidgets @global
;