mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2024-12-13 00:29:12 +00:00
add WGReset
This commit is contained in:
parent
366d765998
commit
d3cad7db22
@ -1121,6 +1121,20 @@ X: WGExit
|
||||
</table>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
####WGReset
|
||||
Deallocate all WeeGUI views and strings. This is called automatically during WeeGUI startup, but you can call it yourself at any time if you want to "start over" with no views. This does not clear the screen or repaint anything.
|
||||
|
||||
<table width="100%">
|
||||
<tr><th>Assembly</th><th>Applesoft</th></tr><tr><td><pre>
|
||||
X: WGReset
|
||||
</pre></td><td><pre>
|
||||
Not available
|
||||
</pre></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
- - -
|
||||
|
@ -73,4 +73,5 @@ WGSetContentWidth = 78
|
||||
WGSetContentHeight = 80
|
||||
WGStrokeRoundRect = 82
|
||||
WGCreateRadio = 84
|
||||
WGReset = 86
|
||||
|
||||
|
BIN
weegui.dsk
BIN
weegui.dsk
Binary file not shown.
32
weegui.s
32
weegui.s
@ -91,10 +91,24 @@ WGInit:
|
||||
; sta LINNUML
|
||||
; jsr SETHI
|
||||
|
||||
jsr WG80 ; Enter 80-col text mode
|
||||
jsr WGInitApplesoft ; Set up Applesoft API
|
||||
jsr WG80 ; Enter 80-col text mode
|
||||
jsr WGInitApplesoft ; Set up Applesoft API
|
||||
|
||||
ldy #15 ; Clear our block allocators
|
||||
RESTORE_AXY
|
||||
|
||||
jmp WGReset
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGReset
|
||||
; Reset views and strings. Called from WGInit during app startup.
|
||||
; Can also be called at any time to "start over" with no views.
|
||||
; (Does not clear screen or repaint.)
|
||||
;
|
||||
WGReset:
|
||||
SAVE_AXY
|
||||
|
||||
ldy #15 ; Clear our block allocators
|
||||
WGInit_clearMemLoop:
|
||||
tya
|
||||
asl
|
||||
@ -103,18 +117,18 @@ WGInit_clearMemLoop:
|
||||
asl
|
||||
tax
|
||||
lda #0
|
||||
sta WG_STRINGS,x
|
||||
sta WG_VIEWRECORDS+2,x
|
||||
sta WG_STRINGS,x
|
||||
dey
|
||||
bpl WGInit_clearMemLoop
|
||||
|
||||
lda #$ff
|
||||
sta WG_PENDINGACTIONVIEW
|
||||
sta WG_FOCUSVIEW
|
||||
|
||||
lda #$ff
|
||||
sta WG_PENDINGACTIONVIEW
|
||||
sta WG_FOCUSVIEW
|
||||
|
||||
RESTORE_AXY
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGExit
|
||||
; Cleanup Should be called once at app shutdown
|
||||
|
Loading…
Reference in New Issue
Block a user