mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2025-04-07 04:37:17 +00:00
- Fixed a bug whereby string arguments couldn't be first in AppleSoft API calls
- Added &TITLE and &SETACT to AppleSoft API
This commit is contained in:
parent
28adec64ca
commit
d7f775609d
48
applesoft.s
48
applesoft.s
@ -221,7 +221,9 @@ WGAmpersandIntArgument:
|
||||
; OUT Y : The argument (MSB)
|
||||
; Side effects: Clobbers all registers
|
||||
WGAmpersandAddrArgument:
|
||||
jsr CHRGOT
|
||||
jsr LINGET
|
||||
|
||||
ldx LINNUML
|
||||
ldy LINNUMH
|
||||
rts
|
||||
@ -421,7 +423,7 @@ WGAmpersand_WINDOW:
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_CHKBOX
|
||||
; Create a checkbox
|
||||
; &CHKBOX(id,x,y)
|
||||
; &CHKBOX(id,x,y,"title")
|
||||
WGAmpersand_CHKBOX:
|
||||
jsr WGAmpersandBeginArguments
|
||||
|
||||
@ -459,7 +461,7 @@ WGAmpersand_CHKBOX:
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_BUTTN
|
||||
; Create a button
|
||||
; &BUTTN(id,x,y,width,"title")
|
||||
; &BUTTN(id,x,y,width,lineNum,"title")
|
||||
WGAmpersand_BUTTN:
|
||||
jsr WGAmpersandBeginArguments
|
||||
|
||||
@ -574,6 +576,42 @@ WGAmpersand_ACTGosub:
|
||||
jmp WGGosub ; No coming back from an Applesoft GOSUB!
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_SETACT
|
||||
; Sets the callback for the selected view
|
||||
; &SETACT(lineNum)
|
||||
WGAmpersand_SETACT:
|
||||
jsr WGAmpersandBeginArguments
|
||||
|
||||
jsr WGAmpersandAddrArgument
|
||||
stx PARAM0
|
||||
sty PARAM1
|
||||
|
||||
jsr WGAmpersandEndArguments
|
||||
|
||||
jsr WGViewSetAction
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_TITLE
|
||||
; Sets the title for the selected view
|
||||
; &TITLE("title")
|
||||
WGAmpersand_TITLE:
|
||||
jsr WGAmpersandBeginArguments
|
||||
|
||||
jsr WGAmpersandStrArgument
|
||||
stx PARAM0
|
||||
sty PARAM1
|
||||
|
||||
jsr WGAmpersandEndArguments
|
||||
|
||||
jsr WGViewSetTitle
|
||||
jsr WGPaintView
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGAmpersand_GOSUB
|
||||
; A custom gosub, because we can. Only for testing at the moment
|
||||
@ -712,6 +750,12 @@ WGAmpersandCommandTable:
|
||||
.byte "ACT",0,0,0,0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_ACT
|
||||
|
||||
.byte "SETACT",0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_SETACT
|
||||
|
||||
.byte "TITLE",0,0,0,0,0,0,0,0,0
|
||||
.addr WGAmpersand_TITLE
|
||||
|
||||
.byte TOKEN_GOSUB,0,0,0,0,0,0,0,0,0,0,0,0,0 ; For internal testing of the procedural gosub
|
||||
.addr WGAmpersand_GOSUB
|
||||
|
||||
|
BIN
guidemo.dsk
BIN
guidemo.dsk
Binary file not shown.
8
views.s
8
views.s
@ -834,9 +834,9 @@ WGViewSetTitle:
|
||||
|
||||
LDY_ACTIVEVIEW
|
||||
lda PARAM0
|
||||
sta WG_VIEWRECORDS+13,y
|
||||
lda PARAM1
|
||||
sta WG_VIEWRECORDS+12,y
|
||||
lda PARAM1
|
||||
sta WG_VIEWRECORDS+13,y
|
||||
|
||||
WGViewSetTitle_done:
|
||||
RESTORE_AXY
|
||||
@ -854,9 +854,9 @@ WGViewSetAction:
|
||||
|
||||
LDY_ACTIVEVIEW
|
||||
lda PARAM0
|
||||
sta WG_VIEWRECORDS+11,y
|
||||
lda PARAM1
|
||||
sta WG_VIEWRECORDS+10,y
|
||||
lda PARAM1
|
||||
sta WG_VIEWRECORDS+11,y
|
||||
|
||||
WGViewSetAction_done:
|
||||
RESTORE_AY
|
||||
|
Loading…
x
Reference in New Issue
Block a user