diff --git a/gui/teatime/teatime.tal b/gui/teatime/teatime.tal index caef796..d79fd19 100644 --- a/gui/teatime/teatime.tal +++ b/gui/teatime/teatime.tal @@ -8,8 +8,6 @@ |000 - @cursor &x $2 &y $2 - @bar &height $1 @remaining-seconds $2 @last-second $1 @height $2 @@ -29,27 +27,29 @@ ( | screen size ) #0148 .Screen/width DEO2 #0110 .Screen/height DEO2 - .DateTime/second DEI .last-second STZ BRK +@on-frame-freeze ( -> ) + [ LIT &lock $1 ] INCk ,&lock STR + ?{ ;on-frame .Screen/vector DEO2 } + BRK + @on-frame ( -> ) - BRK - .Mouse/state DEI ?{ - .remaining-seconds LDZ2 #0000 EQU2 ?{ - .DateTime/second DEI DUP .last-second LDZ EQU ?{ - .last-second STZ - .remaining-seconds LDZ2 #0001 SUB2 DUP2 .remaining-seconds STZ2 - #0007 DIV2 NIP .bar/height STZ - - JMP2r } - POP } } - BRK + .remaining-seconds LDZ2 ORAk ?{ POP2 BRK } + [ LIT2 40 &f $1 ] INCk ,&f STR + NEQ ?{ + [ LIT2 00 _&f ] STR + DUP2 #0001 SUB2 DUP2 .remaining-seconds STZ2 + #0007 DIV2 .height STZ2 + } + POP2 BRK @on-mouse ( -> ) #4100 [ LIT2 00 -Mouse/state ] DEI NEQ #30 SFT2 ;hand-icn ADD2 .Mouse/state DEI ?{ BRK } ( | down ) + .Mouse/ylb DEI #10 SUB DUP #f0 GTH ?{ #00 OVR } POP BRK @@ -63,6 +63,11 @@ ( @|core ) +@ ( -- ) + ;on-frame-freeze .Screen/vector DEO2 + #c0 ;on-frame-freeze/lock STA + JMP2r + @ ( distance* -- ) DUP2 .height EQU2k ?{ STZ2