From c57be8643981d29183b8fcde7be990df1bef4697 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 30 Aug 2024 13:47:12 -0700 Subject: [PATCH] (m291) Scrolling tracks again --- gui/m291/src/m291.tal | 65 ++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/gui/m291/src/m291.tal b/gui/m291/src/m291.tal index f01e107..c3dcb79 100644 --- a/gui/m291/src/m291.tal +++ b/gui/m291/src/m291.tal @@ -116,7 +116,7 @@ POP2 BRK &scroll ( distance -> ) - .selection/scroll LDZ ADD DUP #ff NEQ ?{ POP JMP2r } + .selection/scroll LDZ ADD DUP #ff NEQ ?{ POP BRK } .selection/scroll STZ BRK @@ -222,6 +222,7 @@ .selection STZ ! @ ( alt id -- ) + [ LIT2 00 -selection/scroll ] STZ DUP .lines/folders LDZ LTH ?&folder .lines/folders LDZ SUB DUP .lines/tracks LDZ LTH ?&tracks POP JMP2r @@ -516,15 +517,15 @@ #0008 .Screen/x DEO2 ;dict/empty #0f ! } ( | folders ) - .selection LDZ - ;mem/tracks .lines/tracks LDZ .selection LDZ .lines/folders LDZ SUB + ( >> ) -@ ( addr* length selection -- ) - ,&sel STR - DUP ?{ POP2 POP JMP2r } +@ ( -- ) + .selection LDZ ,&sel STR #0008 .Screen/x DEO2 - #00 SWP2 ,&t STR2 + .lines/tracks LDZ #00 NEQk ?{ POP2 JMP2r } + .selection/scroll LDZ .lines/folders LDZ LTH ?{ + .selection/scroll LDZ .lines/folders LDZ SUB ADD } &>l ( -- ) [ LITr 05 ] ( | selected ) @@ -539,7 +540,31 @@ ( | normal ) #0008 .Screen/x DEO2 #00 OVR - ( CELLSIZE ) #70 SFT2 [ LIT2 &t $2 ] ADD2 STHr + ( CELLSIZE ) #70 SFT2 ;mem/tracks ADD2 STHr + .Screen/y DEI2k #0010 ADD2 ROT DEO2 + INC GTHk ?&>l + POP2 JMP2r + +@ ( -- ) + .selection LDZ ,&sel STR + #0008 .Screen/x DEO2 + .lines/folders LDZ #00 NEQk ?{ POP JMP2r } + .selection/scroll LDZ ADD GTHk ?{ POP2 JMP2r } + &>l ( -- ) + [ LITr 05 ] + ( | selected ) + DUP [ LIT &sel $1 ] NEQ ?{ + POPr [ LITr 06 ] ;fill-icn } + ( | gizmo ) + .Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO + .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2 + [ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 + DUPr [ LITr -Screen/sprite ] DEOr + .Screen/y DEO2 + ( | normal ) + #0008 .Screen/x DEO2 + #00 OVR + ( CELLSIZE ) #70 SFT2 ;mem/folders ADD2 STHr .Screen/y DEI2k #0010 ADD2 ROT DEO2 INC GTHk ?&>l POP2 JMP2r @@ -758,30 +783,6 @@ .Screen/y DEO2 JMP2r -@ ( selection -- ) - ,&sel STR - #0008 .Screen/x DEO2 - .lines/folders LDZ #00 NEQk ?{ POP JMP2r } - .selection/scroll LDZ ADD GTHk ?{ POP2 JMP2r } - &>l ( -- ) - [ LITr 05 ] - ( | selected ) - DUP [ LIT &sel $1 ] NEQ ?{ - POPr [ LITr 06 ] ;fill-icn } - ( | gizmo ) - .Screen/y DEI2 [ LIT2 15 -Screen/auto ] DEO - .Screen/width DEI2 #0010 SUB2 .Screen/x DEO2 - [ LIT2 00 "> ] #20 SUB #50 SFT2 ;font/glyphs ADD2 .Screen/addr DEO2 - DUPr [ LITr -Screen/sprite ] DEOr - .Screen/y DEO2 - ( | normal ) - #0008 .Screen/x DEO2 - #00 OVR - ( CELLSIZE ) #70 SFT2 ;mem/folders ADD2 STHr - .Screen/y DEI2k #0010 ADD2 ROT DEO2 - INC GTHk ?&>l - POP2 JMP2r - @get-uf2-width ( text* -- width* ) [ LIT2r 0000 ] &>while ( -- )