add WGResetView

This commit is contained in:
4am 2018-04-01 22:24:13 -04:00
parent f3a72567a0
commit 25bde6bc2c
6 changed files with 40 additions and 7 deletions

View File

@ -1158,6 +1158,18 @@ Not available
</table>
####WGResetView
Deletes the selected view but does not erase or repaint anything. The ID is now available for use by a new view.
<table width="100%">
<tr><th>Assembly</th><th>Applesoft</th></tr><tr><td><pre>
X: WGResetView
</pre></td><td><pre>
Not available
</pre></td></tr>
</table>
<br><br>
- - -

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -73,8 +73,9 @@ WGSetContentWidth = 78
WGSetContentHeight = 80
WGStrokeRoundRect = 82
WGCreateRadio = 84
WGReset = 86
WGResetAll = 86
WGGetState = 88
WGPendingClick = 90
WGClearPendingClick = 92
WGResetView = 94

12
views.s
View File

@ -388,6 +388,18 @@ WGDeleteView_done:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGResetView
; Deletes the current view but does not erase or repaint anything
;
WGResetView:
SAVE_AX
LDX_ACTIVEVIEW
stz WG_VIEWRECORDS+2,x
RESTORE_AX
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGPaintView
; Paints the current view

Binary file not shown.

View File

@ -76,11 +76,11 @@ WGEntryPointTable:
.addr WGSetContentHeight
.addr WGStrokeRoundRect
.addr WGCreateRadio
.addr WGReset
.addr WGResetAll
.addr WGGetState
.addr WGPendingClick
.addr WGClearPendingClick
.addr WGResetView
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGInit
@ -100,16 +100,16 @@ WGInit:
RESTORE_AXY
jmp WGReset
jmp WGResetAll
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGReset
; Reset views and strings. Called from WGInit during app startup.
; WGResetAll
; Reset all 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:
WGResetAll:
SAVE_AXY
ldy #15 ; Clear our block allocators