(m291) Lock mouse
This commit is contained in:
parent
7917698871
commit
9f48e67209
|
@ -66,21 +66,52 @@
|
|||
POP2 message/<parse>
|
||||
BRK
|
||||
|
||||
@on-mouse-locked ( -> )
|
||||
#c1 ;touch-chr/down ;touch-chr .Mouse/state DEI
|
||||
( unlock ) DUP ?{ ;on-mouse .Mouse/vector DEO2 }
|
||||
( assets ) ?{ SWP2 }
|
||||
POP2 <update-cursor>
|
||||
BRK
|
||||
|
||||
@on-mouse ( -> )
|
||||
( | cursor )
|
||||
#c1 ;touch-chr/down ;touch-chr .Mouse/state DEI ?{ SWP2 }
|
||||
POP2 <update-cursor>
|
||||
.Mouse/y DEI2 DUP2 #0014 LTH2 ?&status-bar
|
||||
( | route events )
|
||||
.Mouse/y DEI2
|
||||
( > ) DUP2 #0014 LTH2 ?&status-bar
|
||||
( > ) [ LIT2 00 -playing ] LDZ EQU ?{ DUP2 #0098 LTH2 ?&player }
|
||||
( | on list )
|
||||
<y-id>
|
||||
.Mouse/state DEI DUP ?{ POP <select>
|
||||
BRK }
|
||||
#01 GTH .selection/mod STZ
|
||||
<pick>
|
||||
[ LIT2 00 -Mouse/state ] DEO
|
||||
<lock-mouse>
|
||||
BRK
|
||||
|
||||
&status-bar ( y* -> )
|
||||
POP2 BRK
|
||||
|
||||
&player ( y* -> )
|
||||
.Mouse/state DEI ?{ POP2 BRK }
|
||||
#0050 SUB2 DUP2 #0020 LTH2 ?&controls
|
||||
#0030 SUB2 #0010 LTH2 ?&seeker
|
||||
BRK
|
||||
|
||||
&controls ( y* -> )
|
||||
POP2 .Mouse/x DEI2 #0010 SUB2 #05 SFT2 NIP
|
||||
( > ) DUP #02 NEQ ?{ <skip-prev>
|
||||
<lock-mouse> }
|
||||
( > ) DUP #03 NEQ ?{ <send-pause>
|
||||
<lock-mouse> }
|
||||
( > ) #04 NEQ ?{ <skip-next>
|
||||
<lock-mouse> }
|
||||
BRK
|
||||
|
||||
&seeker ( -> )
|
||||
BRK
|
||||
|
||||
@on-control ( -> )
|
||||
( | mod )
|
||||
[ LIT2 04 -Controller/button ] DEI AND #00 NEQ .selection/mod STZ
|
||||
|
@ -98,6 +129,10 @@
|
|||
( A ) DUP #01 NEQ ?{ .selection LDZ <pick> }
|
||||
POP BRK
|
||||
|
||||
@<lock-mouse> ( -- )
|
||||
;on-mouse-locked .Mouse/vector DEO2
|
||||
JMP2r
|
||||
|
||||
(
|
||||
@|message )
|
||||
|
||||
|
@ -127,7 +162,7 @@
|
|||
JMP2r
|
||||
|
||||
(
|
||||
@|timestamp ) ( returns value between 0000 and 00d0 )
|
||||
@|timestamp )
|
||||
|
||||
@calc-width ( total* curr* -- width* )
|
||||
STH2
|
||||
|
@ -138,6 +173,15 @@
|
|||
INC2 #01 SFT2 INC2r LITr 01 SFT2r }
|
||||
[ LIT2r 00e7 ] MUL2r STH2r SWP2 DIV2 JMP2r
|
||||
|
||||
(
|
||||
@|controls )
|
||||
|
||||
@<skip-prev> ( -- )
|
||||
JMP2r
|
||||
|
||||
@<skip-next> ( -- )
|
||||
JMP2r
|
||||
|
||||
(
|
||||
@|events )
|
||||
|
||||
|
|
Loading…
Reference in New Issue