gui2: fixed more bugs in layout code. Now basically works!
This commit is contained in:
@@ -288,7 +288,6 @@ test:
|
||||
; ldi r16, HIGH(Debug_Style*2)
|
||||
; std Y+WIDGET_OFFS_STYLE_HI, r16
|
||||
|
||||
|
||||
DEBUG_STOP:
|
||||
bigjmp DEBUG1
|
||||
|
||||
@@ -301,6 +300,23 @@ DEBUG_STOP3:
|
||||
|
||||
|
||||
|
||||
Debug_Style:
|
||||
.dw DISPLAY_COLOR_BLACK ; frontCol_norm
|
||||
.dw DISPLAY_COLOR_GREEN ; backCol_norm
|
||||
.dw DISPLAY_COLOR_BLACK ; borderCol_norm
|
||||
.dw DISPLAY_COLOR_WHITE ; shadowCol_norm
|
||||
|
||||
.dw DISPLAY_COLOR_WHITE ; frontCol_activated
|
||||
.dw DISPLAY_COLOR_NAVY ; backCol_activated
|
||||
.dw DISPLAY_COLOR_BLACK ; borderCol_activated
|
||||
.dw DISPLAY_COLOR_WHITE ; shadowCol_activated
|
||||
|
||||
.db 2, 1 ; outerBorderSize, innerBorderSize
|
||||
.dw ili9341Font12x16_1*2 ; font
|
||||
.db 12, 16 ; charWidth, charHeight
|
||||
|
||||
|
||||
|
||||
mkTestWindow:
|
||||
bigcall GuiApp_GetRootWindow
|
||||
brcc mkTestWindow_ret
|
||||
|
||||
@@ -1034,7 +1034,7 @@ resTextTemp_s:
|
||||
.db "Temp", 0, 0
|
||||
|
||||
resTextHum_s:
|
||||
.db "Feuchte", 0
|
||||
.db "Luft", 0, 0
|
||||
|
||||
resTextUnknown_s:
|
||||
.db "???", 0
|
||||
|
||||
@@ -81,28 +81,18 @@ ClimateWin_new_ret:
|
||||
climateWinCreateSensorWatches:
|
||||
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_SPREAD
|
||||
ldi r20, HLAYOUT_MODE_EXPAND
|
||||
ldi r20, HLAYOUT_MODE_SPREAD
|
||||
; ldi r20, HLAYOUT_MODE_EXPAND
|
||||
bigcall HLayout_new
|
||||
brcc climateWinCreateSensorWatches_ret
|
||||
|
||||
mov xl, yl ; use HLayout as parent
|
||||
mov xh, yh
|
||||
|
||||
push xl ; HLayout
|
||||
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_HUMIDITY96)
|
||||
ldi r21, HIGH(RESSSOURCE_IMG_HUMIDITY96)
|
||||
bigcall ImageView_new
|
||||
pop xh
|
||||
pop xl
|
||||
|
||||
; CO2 sensor watch
|
||||
push xl ; HLayout
|
||||
push xh
|
||||
ldi r16, (1<<OBJECT_OPTS_TIMER_BIT) | (1<<WIDGET_OPTS_INPUT_BIT) ; OPTS
|
||||
ldi r16, (1<<OBJECT_OPTS_TIMER_BIT) | (1<<WIDGET_OPTS_INPUT_BIT) | (1<<WIDGET_OPTS_BORDER_BIT) ; OPTS
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, VALUE_ID_SENSOR_CO2_BASE
|
||||
ldi r21, C03_EEID_SENSOR_CO2
|
||||
@@ -115,7 +105,7 @@ climateWinCreateSensorWatches:
|
||||
; temp sensor watch
|
||||
push xl ; HLayout
|
||||
push xh
|
||||
ldi r16, (1<<OBJECT_OPTS_TIMER_BIT) | (1<<WIDGET_OPTS_INPUT_BIT) ; OPTS
|
||||
ldi r16, (1<<OBJECT_OPTS_TIMER_BIT) | (1<<WIDGET_OPTS_INPUT_BIT) | (1<<WIDGET_OPTS_BORDER_BIT) ; OPTS
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, VALUE_ID_SENSOR_TEMP_BASE
|
||||
ldi r21, C03_EEID_SENSOR_TEMP
|
||||
@@ -125,7 +115,6 @@ climateWinCreateSensorWatches:
|
||||
pop xl
|
||||
brcc climateWinCreateSensorWatches_ret
|
||||
|
||||
#if 0
|
||||
; humidity sensor watch
|
||||
push xl ; HLayout
|
||||
push xh
|
||||
@@ -137,7 +126,6 @@ climateWinCreateSensorWatches:
|
||||
bigcall SensorWatch_new
|
||||
pop xh
|
||||
pop xl
|
||||
#endif
|
||||
|
||||
climateWinCreateSensorWatches_ret:
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user