Limit bounds

This commit is contained in:
Devine Lu Linvega 2024-02-11 09:32:57 -08:00
parent db9edf663e
commit 563e9a5e3f
1 changed files with 5 additions and 2 deletions

View File

@ -23,6 +23,9 @@
@on-mouse ( -> ) @on-mouse ( -> )
[ LIT2 00 -Mouse/state ] DEI NEQ #42 ADD ;pointer-icn <update-pointer> [ LIT2 00 -Mouse/state ] DEI NEQ #42 ADD ;pointer-icn <update-pointer>
( | within )
.Mouse/x DEI2 #0008 SUB2 #0120 LTH2 ?{ BRK }
.Mouse/y DEI2 #0008 SUB2 #00c0 LTH2 ?{ BRK }
.Mouse/state DEI ?on-mouse-down .Mouse/state DEI ?on-mouse-down
( | hover ) ( | hover )
get-mouse-key <set-hover> get-mouse-key <set-hover>
@ -42,7 +45,6 @@
JMP2r JMP2r
@<set-hover> ( id* -- ) @<set-hover> ( id* -- )
DUP2 #0030 LTH2 ?{ POP2 JMP2r }
DUP2 .hover LDZ2 EQU2 ?{ DUP2 .hover LDZ2 EQU2 ?{
( undraw ) .hover LDZ2 ;btn-chr <draw-key-id> ( undraw ) .hover LDZ2 ;btn-chr <draw-key-id>
DUP2 ;btn-hover-chr <draw-key-id> DUP2 ;btn-hover-chr <draw-key-id>
@ -84,9 +86,10 @@
JMP2r JMP2r
@<draw-key> ( a* b* c* frame* -- ) @<draw-key> ( a* b* c* frame* -- )
DUP2 ;btn-hover-chr EQU2 STH
<draw-button> <draw-button>
.Screen/x DEI2k #0002 SUB2 ROT DEO2 .Screen/x DEI2k #0002 SUB2 ROT DEO2
.Screen/y DEI2k #0024 SUB2 ROT DEO2 .Screen/y DEI2k #0024 STHr SUB SUB2 ROT DEO2
( | a ) ( | a )
<draw-glyph> <draw-glyph>
.Screen/x DEI2k #0002 SUB2 ROT DEO2 .Screen/x DEI2k #0002 SUB2 ROT DEO2