new version of WeeGUI

This commit is contained in:
4am 2018-03-03 11:41:09 -05:00
parent 3fedcddaa9
commit 4bca9671aa
5 changed files with 22 additions and 15 deletions

Binary file not shown.

View File

@ -73,4 +73,5 @@ WGSetContentWidth = 78
WGSetContentHeight = 80
WGStrokeRoundRect = 82
WGCreateRadio = 84
WGReset = 86

View File

@ -219,12 +219,13 @@ LoadGameInfo
sta $02
lda mlilen+1
sta $03
ldy #$00
parseloop
lda ($00)
lda ($00),y
cmp #$0A ; LF -> 0x00 (WeeGUI wants null-terminated strings)
bne .notCR
lda #$00
sta ($00)
sta ($00),y
lda #$FF
sta bFoundCR
bra .next
@ -237,21 +238,20 @@ parseloop
bmi .parsesectionname
bvs .next
tax
beq .nohighbit
beq .nostore
cmp #$5E ; '^' -> closed-apple mousetext
bne +
lda #$40
sta ($00)
bra .nohighbit
bra .store
+ cmp #$26 ; '&' -> open-apple mousetext
bne .highbit
lda #$41
sta ($00)
bra .nohighbit
bra .store
.highbit
ora #$80
sta ($00)
.nohighbit
.store
sta ($00),y
.nostore
bit bFoundCR
bpl .next
stz bFoundCR
@ -261,10 +261,14 @@ parseloop
; Save this address in the sectionPointers array.
asl
tax
lda $00
tya
clc
adc $00
sta sectionPointers-2,x
lda $01
sta sectionPointers-1,x
bcc +
inc
+ sta sectionPointers-1,x
stz iSection
bra .next
.startsectionname

View File

@ -31,7 +31,8 @@ ID_OPTIONS_CANCEL = 9
OptionsDialog
ldx #$FF
txs
jsr WGInit ; reset WeeGUI
ldx #WGReset ; reset WeeGUI
jsr WeeGUI
jsr CreateTitleView ; create title bar (defined in paintcommon.a)
@ -158,9 +159,6 @@ HandleOptionsKey
callback_options_ok
; TODO set preferences
callback_options_cancel
ldx #$FF
txs
jsr WGInit
jmp MainScreen
.viewFrame

View File

@ -45,6 +45,10 @@ Start
jsr WeeGUI
MainScreen
ldx #$FF
txs
ldx #WGReset ; reset WeeGUI views
jsr WeeGUI
jsr CreateViews ; create all WeeGUI views (UI elements)
ldx #WGClearScreen ; clear screen
jsr WeeGUI