Merge pull request #22 from a2-4am/master

add WGGetState
This commit is contained in:
blondie7575
2018-03-26 16:54:56 -07:00
committed by GitHub
5 changed files with 38 additions and 1 deletions
+14 -1
View File
@@ -732,13 +732,26 @@ Sets the currently selected view's value. For progress bar views, this is the pr
<table width="100%">
<tr><th>Assembly</th><th>Applesoft</th></tr><tr><td><pre>
X: WGSetState
A: new value
PARAM0: new value
</td><td>
&SETV(value)
</td></tr>
</table>
####WGGetState
Gets the currently selected view's value. For progress bar views, this is the progress value. For checkboxes and radio buttons, 1 is checked and 0 is unchecked.
<table width="100%">
<tr><th>Assembly</th><th>Applesoft</th></tr><tr><td><pre>
X: WGGetState
On exit, the value is in PARAM0
</td><td>
Not available
</td></tr>
</table>
####WGViewSetRawTitle
Sets the currently selected view's title to be rendered in raw bytes (or not). This allows some advanced tricks with using Mousetext and mixed inversion in view titles.
+1
View File
@@ -74,4 +74,5 @@ WGSetContentHeight = 80
WGStrokeRoundRect = 82
WGCreateRadio = 84
WGReset = 86
WGGetState = 88
+21
View File
@@ -270,6 +270,27 @@ WGSetState_done:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGGetState
; Gets state field in view record
; on exit, PARAM0 contains the state value, stripped of the high
; bit
;
WGGetState:
SAVE_AY
LDY_ACTIVEVIEW
lda WG_VIEWRECORDS+9,y
and #%01111111
sta PARAM0
WGGetState_done:
RESTORE_AY
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGCreateButton
; Creates a new button
BIN
View File
Binary file not shown.
+2
View File
@@ -77,6 +77,8 @@ WGEntryPointTable:
.addr WGStrokeRoundRect
.addr WGCreateRadio
.addr WGReset
.addr WGGetState
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;