avr: more work on c03 and gui.

This commit is contained in:
Martin Preuss
2026-04-27 23:30:49 +02:00
parent 3b7317bb0f
commit 8b17a63fa1
7 changed files with 126 additions and 44 deletions

View File

@@ -371,41 +371,7 @@ C03App_OnCmdBack:
; @clobbers any, !X
C03App_CreateButton:
push xl
push xh
push r20
push r21
push r22
ldi r20, BUTTON_MODE_NORMAL
bigcall Button_new
pop r22
pop r21
pop r20
brcc C03App_CreateButton_done
mov xl, yl
mov xh, yh
push xl ; Button
push xh
push r22
ldi r16, 0
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
bigcall ImageView_new
pop r22
pop yh ; pop button into Y
pop yl
brcc C03App_CreateButton_done
pop xh
pop xl
std Y+OBJECT_OFFS_TARGET_LO, xl
std Y+OBJECT_OFFS_TARGET_HI, xh
std Y+OBJECT_OFFS_SELECTOR, r22
rjmp C03App_CreateButton_ret
C03App_CreateButton_done:
pop xh
pop xl
C03App_CreateButton_ret:
ret
bigjmp ImageButton_new
; @end