gui: improved style handling.
This commit is contained in:
@@ -104,6 +104,31 @@ Button_Init:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Button_OnSetValueStyle @global
|
||||
;
|
||||
; @param Y address of widget
|
||||
; @param X=new style
|
||||
|
||||
Button_OnSetValueStyle:
|
||||
std Y+WIDGET_OFFS_STYLE_LO, xl
|
||||
std Y+WIDGET_OFFS_STYLE_HI, xh
|
||||
bigcall OBJ_GetFirstChild
|
||||
brcc Button_OnSetValueStyle_ret
|
||||
push yl
|
||||
push yh
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall Widget_SetStyle ; set style in child
|
||||
pop yh
|
||||
pop yl
|
||||
Button_OnSetValueStyle_ret:
|
||||
sec
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Button_OnTouchBegin @global
|
||||
;
|
||||
@@ -340,6 +365,7 @@ Button_DefaultSignalmap:
|
||||
.db 0, WIDGET_SIGNAL_LAYOUT, LOW(Button_OnLayout), HIGH(Button_OnLayout)
|
||||
.db WIDGET_VALUE_DEFAULT_WIDTH, WIDGET_SIGNAL_GETVALUE, LOW(Button_OnGetDefaultWidth), HIGH(Button_OnGetDefaultWidth)
|
||||
.db WIDGET_VALUE_DEFAULT_HEIGHT, WIDGET_SIGNAL_GETVALUE, LOW(Button_OnGetDefaultHeight), HIGH(Button_OnGetDefaultHeight)
|
||||
.db WIDGET_VALUE_STYLE, WIDGET_SIGNAL_SETVALUE, LOW(Button_OnSetValueStyle), HIGH(Button_OnSetValueStyle)
|
||||
|
||||
.db 0, 0, 0, 0 ; end of table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user