gui2: added generic button class

this gives child elements a button behavior.
This commit is contained in:
Martin Preuss
2026-03-09 18:20:51 +01:00
parent f5e19ac0a1
commit 2827f4e063
6 changed files with 598 additions and 18 deletions

View File

@@ -337,19 +337,19 @@ OBJ_GetLastChild_ret:
; @param R16 idx of child to get (starting at 0)
; @return CFLAG set, if found, cleared otherwise
; @return r19:r18 resulting object
; @clobbers none
; @clobbers r16
OBJ_GetChildAt:
push yl
push yh
rcall OBJ_GetFirstChild ; R19:R18=obj (none)
brcc OBJ_GetChildAt_ret
OBJ_GetChildAt_loop:
tst r16
breq OBJ_GetChildAt_secRet
mov yl, r18
mov yh, r19
dec r16
rcall OBJ_GetNext ; R19:R18=obj (none)
brcs OBJ_GetChildAt_loop
rjmp OBJ_GetChildAt_ret ; idx too high, not found