hide cursor after 1 second of no movement
This commit is contained in:
parent
1df3f97357
commit
c822d1543e
23
term.tal
23
term.tal
|
@ -104,13 +104,14 @@
|
|||
@lastmouse-x $2 ( last mouse x )
|
||||
@lastmouse-y $2 ( last mouse y )
|
||||
@lastmouse-st $1 ( last mouse press )
|
||||
@is-lit $1
|
||||
@is-lit-flip $1
|
||||
@lit-click-x $2
|
||||
@lit-click-y $2
|
||||
@lit-drag-x $2
|
||||
@lit-drag-y $2
|
||||
@flash $1
|
||||
@is-lit $1 ( are we selecting an area? )
|
||||
@is-lit-flip $1 ( is the selection flipped? i.e. drawing left/up )
|
||||
@lit-click-x $2 ( x coord of starting selection click )
|
||||
@lit-click-y $2 ( y coord of starting selection click )
|
||||
@lit-drag-x $2 ( x coord of selection drag )
|
||||
@lit-drag-y $2 ( y coord of selection drag )
|
||||
@flash $1 ( visual bell flash timer )
|
||||
@pointer-ttl $1 ( visible cursor timer )
|
||||
|
||||
( terminal settings )
|
||||
@irm $1 ( 01: insert and move right, 00: replace and overwrite )
|
||||
|
@ -253,6 +254,10 @@
|
|||
POP2 POP2r JMP2r ( )
|
||||
|
||||
@redraw ( -> BRK )
|
||||
.pointer-ttl LDZ #00 EQU ?&pointer-ok ( )
|
||||
.pointer-ttl LDZk INC DUP ROT STZ ?&pointer-ok
|
||||
#01 .dirty STZ ( redraw without pointer )
|
||||
&pointer-ok
|
||||
.dirty LDZ #00 EQU ?&done
|
||||
LIT2r =cells ( [addr*] )
|
||||
.rows LDZ2 #0000 DUP2 #0008 ( border ) ADD2 .Screen/y DEO2
|
||||
|
@ -495,9 +500,11 @@
|
|||
|
||||
@draw-pointer ( -> )
|
||||
.lastmouse-x LDZ2 .lastmouse-y LDZ2 ( x* y* )
|
||||
#01e0 ;cp437 ADD2 !draw-at ( )
|
||||
.pointer-ttl LDZ ?&visible #0000 !&finally
|
||||
&visible #01e0 &finally ;cp437 ADD2 !draw-at
|
||||
|
||||
@on-move ( -> )
|
||||
#c4 .pointer-ttl STZ ( pointer visible for ~1 second )
|
||||
.Mouse/x DEI2 .lastmouse-x LDZ2 NEQ2 ?&redraw ( )
|
||||
.Mouse/y DEI2 .lastmouse-y LDZ2 NEQ2 ?&redraw ( )
|
||||
JMP2r ( )
|
||||
|
|
Loading…
Reference in New Issue