... | ... |
@@ -15,6 +15,7 @@ |
15 | 15 |
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] |
16 | 16 |
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |
17 | 17 |
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ] |
18 |
+|80 @Controller [ &vector $2 &button $1 &key $1 ] |
|
18 | 19 |
|
19 | 20 |
( variables ) |
20 | 21 |
|
... | ... |
@@ -38,6 +39,7 @@ |
38 | 39 |
( vectors ) |
39 | 40 |
;on-frame .Screen/vector DEO2 |
40 | 41 |
;on-mouse .Mouse/vector DEO2 |
42 |
+ ;on-button .Controller/vector DEO2 |
|
41 | 43 |
|
42 | 44 |
( find center ) |
43 | 45 |
.Screen/width DEI2 2// .center/x STZ2 |
... | ... |
@@ -72,6 +74,17 @@ BRK |
72 | 74 |
|
73 | 75 |
BRK |
74 | 76 |
|
77 |
+@on-button ( -> ) |
|
78 |
+ |
|
79 |
+ .Controller/button DEI #00 EQU ,&no-touch JCN |
|
80 |
+ ( incr ) .style LDZ #01 ADD #03 MOD .style STZ |
|
81 |
+ ( bg ) ;tiles .style LDZ #40 SFT TOS ADD2 ;cover-pattern JSR2 |
|
82 |
+ ( fg ) ;redraw JSR2 |
|
83 |
+ ( release ) #00 .Mouse/state DEO |
|
84 |
+ &no-touch |
|
85 |
+ |
|
86 |
+BRK |
|
87 |
+ |
|
75 | 88 |
@redraw ( -- ) |
76 | 89 |
|
77 | 90 |
( hrs ) |