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

View File

@@ -503,7 +503,7 @@ Debug_Style:
.include "common/eeprom_tlv.asm"
.include "common/divide.asm"
;.include "common/multiply.asm"
.include "common/multiply.asm"
.include "common/itoa.asm"
.include "common/ressource.asm"
@@ -518,6 +518,7 @@ GUI_MODULE_BEGIN:
.include "modules/lcd2/gui/base/label.asm"
.include "modules/lcd2/gui/base/button.asm"
.include "modules/lcd2/gui/base/imageview.asm"
.include "modules/lcd2/gui/base/imagebutton.asm"
.include "modules/lcd2/gui/base/valuelabel.asm"
.include "modules/lcd2/gui/base/checkbox.asm"
.include "modules/lcd2/gui/base/checkbutton.asm"

View File

@@ -237,7 +237,6 @@ netStatWinCreateLabel:
; @routine netStatWinCreateValueLabel
;
; @param X parent (content sub-window of main window)
; @param r21:r20 id of text ressource
; @return CFLAG set if created, cleared otherwise
; @return Y new object created
; @clobbers !X
@@ -248,7 +247,8 @@ netStatWinCreateValueLabel:
ldi r16, 0
ldi r17, (WIDGET_PACK_FILLED<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_CENTER<<WIDGET_PACK_VSELF0_BIT) | \
(WIDGET_PACK_END<<WIDGET_PACK_HCONTENT0_BIT) | (WIDGET_PACK_CENTER<<WIDGET_PACK_VCONTENT0_BIT)
clr r20
clr r20 ; postkomma digits
clr r21 ; total digits (variable)
bigcall ValueLabel_new
pop xh
pop xl