mlayout: works for first row now (still WIP!)
This commit is contained in:
@@ -339,19 +339,25 @@ mkTestWindow:
|
||||
|
||||
push xl ; content window
|
||||
push xh
|
||||
; rcall mkTestWidgets
|
||||
rcall mkSimpleTestWidgets
|
||||
rcall mkTestWidgets
|
||||
; rcall mkSimpleTestWidgets
|
||||
pop xh
|
||||
pop xl
|
||||
mkTestWindow_popRet:
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
ldi r16, LOW(Debug_Style*2)
|
||||
std Y+WIDGET_OFFS_STYLE_LO, r16
|
||||
ldi r16, HIGH(Debug_Style*2)
|
||||
std Y+WIDGET_OFFS_STYLE_HI, r16
|
||||
|
||||
mkTestWindow_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine mkTestWidgets
|
||||
;
|
||||
@@ -400,6 +406,82 @@ mkTestWidgets_popRet:
|
||||
mkTestWidgets_ret:
|
||||
ret
|
||||
; @end
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine mkTestWidgets
|
||||
;
|
||||
; @param X pointer to MainWindow content window (becomes parent)
|
||||
; @return CFLAG set of okay, cleared otherwise
|
||||
; @return Y address of newly created object
|
||||
|
||||
mkTestWidgets:
|
||||
ldi r16, 0 ; OPTS
|
||||
ldi r17, (WIDGET_PACK_FILLED<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_FILLED<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, HLAYOUT_MODE_COLUMNS
|
||||
ldi r21, 2
|
||||
bigcall MLayout_new
|
||||
brcc mkTestWidgets_ret
|
||||
|
||||
push yl
|
||||
push yh
|
||||
mov xl, yl ; use HLayout as parent
|
||||
mov xh, yh
|
||||
|
||||
push xl ; MLayout
|
||||
push xh
|
||||
ldi r16, 0
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, LOW(RESSSOURCE_IMG_HUMIDITY)
|
||||
ldi r21, HIGH(RESSSOURCE_IMG_HUMIDITY)
|
||||
bigcall ImageView_new
|
||||
pop xh
|
||||
pop xl
|
||||
brcc mkTestWidgets_popRet
|
||||
|
||||
push xl ; MLayout
|
||||
push xh
|
||||
ldi r16, 0
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, LOW(RESSSOURCE_IMG_CLOUD)
|
||||
ldi r21, HIGH(RESSSOURCE_IMG_CLOUD)
|
||||
bigcall ImageView_new
|
||||
pop xh
|
||||
pop xl
|
||||
brcc mkTestWidgets_popRet
|
||||
|
||||
#if 0
|
||||
push xl ; MLayout
|
||||
push xh
|
||||
ldi r16, 0
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, LOW(RESSSOURCE_IMG_HUMIDITY)
|
||||
ldi r21, HIGH(RESSSOURCE_IMG_HUMIDITY)
|
||||
bigcall ImageView_new
|
||||
pop xh
|
||||
pop xl
|
||||
brcc mkTestWidgets_popRet
|
||||
|
||||
push xl ; MLayout
|
||||
push xh
|
||||
ldi r16, 0
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, LOW(RESSSOURCE_IMG_LIGHT)
|
||||
ldi r21, HIGH(RESSSOURCE_IMG_LIGHT)
|
||||
bigcall ImageView_new
|
||||
pop xh
|
||||
pop xl
|
||||
brcc mkTestWidgets_popRet
|
||||
#endif
|
||||
|
||||
mkTestWidgets_popRet:
|
||||
pop yh
|
||||
pop yl
|
||||
mkTestWidgets_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
@@ -433,6 +515,8 @@ mkSimpleTestWidgets_ret:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; includes
|
||||
|
||||
@@ -470,7 +554,8 @@ GUI2_MODULE_BEGIN:
|
||||
.include "modules/lcd2/gui2/base/layout.asm"
|
||||
.include "modules/lcd2/gui2/base/hlayout.asm"
|
||||
.include "modules/lcd2/gui2/base/vlayout.asm"
|
||||
.include "modules/lcd2/gui2/base/mlayout2.asm"
|
||||
.include "modules/lcd2/gui2/base/mlayout.asm"
|
||||
.include "modules/lcd2/gui2/base/mlayout_column.asm"
|
||||
.include "modules/lcd2/gui2/base/guiapp.asm"
|
||||
.include "modules/lcd2/gui2/base/mainwindow.asm"
|
||||
.include "modules/lcd2/gui2/base/rootwindow.asm"
|
||||
|
||||
Reference in New Issue
Block a user