1
0
mirror of https://github.com/blondie7575/WeeGUI.git synced 2025-04-29 07:37:50 +00:00

add WGGetState

This commit is contained in:
4am 2018-03-26 19:35:55 -04:00
parent cf32f7f8c3
commit b8ca8dd6d4
5 changed files with 38 additions and 1 deletions

@ -734,13 +734,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.

@ -74,4 +74,5 @@ WGSetContentHeight = 80
WGStrokeRoundRect = 82
WGCreateRadio = 84
WGReset = 86
WGGetState = 88

21
views.s

@ -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

Binary file not shown.

@ -77,6 +77,8 @@ WGEntryPointTable:
.addr WGStrokeRoundRect
.addr WGCreateRadio
.addr WGReset
.addr WGGetState
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;