diff --git a/res/WEEGUI b/res/WEEGUI index f19c9c5..224f917 100644 Binary files a/res/WEEGUI and b/res/WEEGUI differ diff --git a/src/WeeGUI_MLI.s b/src/WeeGUI_MLI.s index fc614fc..543d8f4 100644 --- a/src/WeeGUI_MLI.s +++ b/src/WeeGUI_MLI.s @@ -74,4 +74,5 @@ WGSetContentHeight = 80 WGStrokeRoundRect = 82 WGCreateRadio = 84 WGReset = 86 +WGGetState = 88 diff --git a/src/okvs.a b/src/okvs.a index 3739c4e..c958475 100644 --- a/src/okvs.a +++ b/src/okvs.a @@ -299,7 +299,6 @@ okvs_update sty DEST+1 lda (SAVE) tay - iny - lda (SAVE),y sta (DEST),y dey diff --git a/src/paintcommon.a b/src/paintcommon.a index bfc7578..5b89d35 100644 --- a/src/paintcommon.a +++ b/src/paintcommon.a @@ -118,5 +118,32 @@ SetCheckboxByPref SetPrefByCheckbox +PARAMS_ON_STACK 3 + ldy #1 + lda (PARAM),y + sta .id + iny + lda (PARAM),y + sta .key + iny + lda (PARAM),y + sta .key+1 + + ldx #WGSelectView +.id=*+1 + lda #$FD ; set at runtime + jsr WeeGUI + ldx #WGGetState + jsr WeeGUI + + lda PARAM0 + and #1 + sta .value+1 + + jsr okvs_update + !word gPrefsStore +.key !word $FDFD ; set at runtime + !word .value rts +.value !byte 1 + !byte $FD ; set at runtime } diff --git a/src/paintoptions.a b/src/paintoptions.a index c1ebd15..ac6ec1e 100644 --- a/src/paintoptions.a +++ b/src/paintoptions.a @@ -86,7 +86,7 @@ OptionsDialog jsr WeeGUI ldx #WGSetCursor ; paint static text labels - lda #4 + lda #6 sta PARAM0 lda #3 sta PARAM1 @@ -99,7 +99,7 @@ OptionsDialog jsr WeeGUI ldx #WGSetCursor - lda #4 + lda #6 sta PARAM0 lda #8 sta PARAM1 @@ -112,7 +112,7 @@ OptionsDialog jsr WeeGUI ldx #WGSetCursor - lda #4 + lda #6 sta PARAM0 lda #13 sta PARAM1 @@ -125,7 +125,7 @@ OptionsDialog jsr WeeGUI ldx #WGSetCursor - lda #4 + lda #6 sta PARAM0 lda #18 sta PARAM1 @@ -148,19 +148,19 @@ OptionsDialog ; action keys for options screen .keys - !byte $CF,ID_OPTIONS_OK ; O - !byte $EF,ID_OPTIONS_OK ; o - !byte $8D,ID_OPTIONS_OK ; Return - !byte $C3,ID_OPTIONS_CANCEL ; C - !byte $E3,ID_OPTIONS_CANCEL ; c - !byte $9B,ID_OPTIONS_CANCEL ; Esc - !byte $B4,ID_OPTIONS_FORCE40 ; 4 - !byte $D5,ID_OPTIONS_FORCEUPPER ; U - !byte $F5,ID_OPTIONS_FORCEUPPER ; u - !byte $C6,ID_OPTIONS_SCRIPTTOFILE ; F - !byte $E6,ID_OPTIONS_SCRIPTTOFILE ; f - !byte $D3,ID_OPTIONS_AUTOSCRIPT ; S - !byte $F3,ID_OPTIONS_AUTOSCRIPT ; s + !byte $CF,ID_OPTIONS_OK ; O + !byte $EF,ID_OPTIONS_OK ; o + !byte $8D,ID_OPTIONS_OK ; Return + !byte $C3,ID_OPTIONS_CANCEL ; C + !byte $E3,ID_OPTIONS_CANCEL ; c + !byte $9B,ID_OPTIONS_CANCEL ; Esc + !byte $B4,ID_OPTIONS_FORCE40 ; 4 + !byte $D5,ID_OPTIONS_FORCEUPPER ; U + !byte $F5,ID_OPTIONS_FORCEUPPER ; u + !byte $C6,ID_OPTIONS_SCRIPTTOFILE ; F + !byte $E6,ID_OPTIONS_SCRIPTTOFILE ; f + !byte $D3,ID_OPTIONS_AUTOSCRIPT ; S + !byte $F3,ID_OPTIONS_AUTOSCRIPT ; s .endkeys HandleOptionsKey @@ -195,6 +195,7 @@ callback_options_ok jsr SetPrefByCheckbox !byte ID_OPTIONS_AUTOSCRIPT !word kAutoScript + jsr SaveGlobalPreferences ; execution falls through here callback_options_cancel jmp MainScreen @@ -255,7 +256,7 @@ callback_options_cancel !byte $75 ; 'u' inverse !text "ppercase",0 .stringForceUpperDescription - !text "A MATTER OF PREFERENCE",0 + !text "A MATTER OF PREFERENCE, I SUPPOSE",0 .viewScriptToFile !byte ID_OPTIONS_SCRIPTTOFILE ; view ID