gui: removed unused code.
This commit is contained in:
@@ -82,101 +82,12 @@ Dialog_AddDefaultButtons:
|
||||
bigcall CWidget_Create
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
|
||||
|
||||
; create HLayout
|
||||
push yl
|
||||
push yh
|
||||
ldi r16, 0 ; OPTS
|
||||
ldi r17, (WIDGET_PACK_END<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_END<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r20, HLAYOUT_MODE_EXPAND
|
||||
bigcall HLayout_new
|
||||
mov xl, yl ; use layout as new parent
|
||||
mov xh, yh
|
||||
pop yh
|
||||
pop yl
|
||||
brcc Dialog_AddDefaultButtons_ret
|
||||
|
||||
; create OK button
|
||||
ldi r20, LOW(RESSOURCE_TXT_DIALOGOK)
|
||||
ldi r21, HIGH(RESSOURCE_TXT_DIALOGOK)
|
||||
ldi r22, DIALOG_SEL_OKBUTTON
|
||||
rcall dialogCreateButton
|
||||
brcc Dialog_AddDefaultButtons_ret
|
||||
|
||||
; create Abort button
|
||||
ldi r20, LOW(RESSOURCE_TXT_DIALOGABORT)
|
||||
ldi r21, HIGH(RESSOURCE_TXT_DIALOGABORT)
|
||||
ldi r22, DIALOG_SEL_ABORTBUTTON
|
||||
rcall dialogCreateButton
|
||||
brcc Dialog_AddDefaultButtons_ret
|
||||
|
||||
; change style of HLayout (more space)
|
||||
adiw xh:xl, WIDGET_OFFS_STYLE_LO
|
||||
ldi r16, LOW(Dialog_HLayoutStyle*2)
|
||||
st X+, r16
|
||||
ldi r16, HIGH(Dialog_HLayoutStyle*2)
|
||||
st X, r16
|
||||
sec
|
||||
|
||||
Dialog_AddDefaultButtons_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine dialogCreateButton
|
||||
;
|
||||
; @param Y pointer to MainWindow (target)
|
||||
; @param r21:r20 text ressource
|
||||
; @param r22 selector
|
||||
; @clobbers any, !X, !Y, !Z
|
||||
|
||||
dialogCreateButton:
|
||||
push zl
|
||||
push zh
|
||||
push yl
|
||||
push yh
|
||||
ldi r16, (1<<WIDGET_OPTS_BORDER_BIT) ; OPTS
|
||||
ldi r17, (WIDGET_PACK_END<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_END<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||
ldi r23, BUTTON_MODE_NORMAL
|
||||
push xl
|
||||
push xh
|
||||
bigcall TextButton_new
|
||||
pop xh
|
||||
pop xl
|
||||
mov zl, yl
|
||||
mov zh, yh
|
||||
pop yh
|
||||
pop yl
|
||||
brcc dialogCreateButton_done
|
||||
std Z+OBJECT_OFFS_TARGET_LO, yl
|
||||
std Z+OBJECT_OFFS_TARGET_HI, yh
|
||||
; set button style
|
||||
push xl
|
||||
push xh
|
||||
push yl
|
||||
push yh
|
||||
mov yl, zl
|
||||
mov yh, zh
|
||||
ldi xl, LOW(DefaultStyle_SpacyButton*2)
|
||||
ldi xh, HIGH(DefaultStyle_SpacyButton*2)
|
||||
bigcall Widget_SetStyle
|
||||
pop yh
|
||||
pop yl
|
||||
pop xh
|
||||
pop xl
|
||||
sec
|
||||
dialogCreateButton_done:
|
||||
pop zh
|
||||
pop zl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
; signal handlers
|
||||
|
||||
Reference in New Issue
Block a user