gui2: added generic button class
this gives child elements a button behavior.
This commit is contained in:
@@ -265,11 +265,34 @@ test:
|
||||
ldi r20, LOW(RESSSOURCE_TXT_LIVINGROOM)
|
||||
ldi r21, HIGH(RESSSOURCE_TXT_LIVINGROOM)
|
||||
bigcall MainWindow_new
|
||||
bigcall MainWindow_GetContentWidget
|
||||
brcc DEBUG_STOP
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
push xl
|
||||
push xh
|
||||
mov xl, r18
|
||||
mov xh, r19
|
||||
|
||||
ldi r16, (1<<OBJECT_OPTS_TIMER_BIT) | (1<<WIDGET_OPTS_INPUT_BIT) ; OPTS
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, BUTTON_MODE_NORMAL
|
||||
bigcall Button_new
|
||||
mov xl, yl
|
||||
mov xh, yh
|
||||
|
||||
ldi r16, (1<<WIDGET_OPTS_BORDER_BIT)
|
||||
ldi r17, (WIDGET_PACK_BEGIN<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VSELF0_BIT) |\
|
||||
(WIDGET_PACK_BEGIN<<WIDGET_PACK_HCONTENT0_BIT) | (WIDGET_PACK_BEGIN<<WIDGET_PACK_VCONTENT0_BIT)
|
||||
ldi r20, LOW(RESSSOURCE_TXT_BUERO)
|
||||
ldi r21, HIGH(RESSSOURCE_TXT_BUERO)
|
||||
bigcall Label_new
|
||||
pop xh
|
||||
pop xl
|
||||
pop yh
|
||||
pop yl
|
||||
brcc DEBUG_STOP
|
||||
|
||||
bigcall GuiApp_EnterWindow
|
||||
brcc DEBUG_STOP3
|
||||
|
||||
@@ -329,6 +352,7 @@ DEBUG_STOP3:
|
||||
.include "modules/lcd2/gui2/base/mainwindow.asm"
|
||||
.include "modules/lcd2/gui2/base/rootwindow.asm"
|
||||
.include "modules/lcd2/gui2/base/label.asm"
|
||||
.include "modules/lcd2/gui2/base/button.asm"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user