mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-26 15:53:01 +00:00
(boot.tal) Fixed issue with empty folders
This commit is contained in:
parent
e89ad768aa
commit
3ed8a61625
1 changed files with 21 additions and 0 deletions
|
@ -189,6 +189,10 @@ RTN
|
|||
DUP .browser/last LDZ ! ,&has-changed JCN
|
||||
POP RTN
|
||||
&has-changed
|
||||
( beyond )
|
||||
DUP ;dir/lines LDA < ,&valid JCN
|
||||
POP RTN
|
||||
&valid
|
||||
|
||||
#00 ;draw-browser JSR2
|
||||
DUP .browser/sel STZ
|
||||
|
@ -263,6 +267,9 @@ RTN
|
|||
|
||||
@draw-browser ( mask -- )
|
||||
|
||||
( when empty )
|
||||
;dir/lines LDA #01 = ;draw-browser-empty JCN2
|
||||
|
||||
STH
|
||||
|
||||
( draw hand )
|
||||
|
@ -273,18 +280,32 @@ RTN
|
|||
( draw files )
|
||||
LINES-COUNT #00
|
||||
&loop
|
||||
( reached end )
|
||||
DUP INC ;dir/lines LDA > ,&end JCN
|
||||
( has file )
|
||||
.browser/x LDZ2 .Screen/x DEO2
|
||||
DUP TOS 10** .browser/y LDZ2 ++ .Screen/y DEO2
|
||||
DUP .browser/scroll LDZ + ;get-entry JSR2
|
||||
DUP2 ;get-type JSR2 ;draw-type JSR2
|
||||
#01 STHkr * ;draw-str JSR2
|
||||
INC GTHk ,&loop JCN
|
||||
&end
|
||||
POP2
|
||||
|
||||
POPr
|
||||
|
||||
RTN
|
||||
|
||||
@draw-browser-empty ( mask -- )
|
||||
|
||||
POP
|
||||
.browser/x LDZ2 .Screen/x DEO2
|
||||
.browser/y LDZ2 .Screen/y DEO2
|
||||
;&empty-txt #01 ;draw-str JSR2
|
||||
|
||||
RTN
|
||||
&empty-txt "Empty 20 "Folder $1
|
||||
|
||||
@get-type ( line* -- type )
|
||||
|
||||
;scap JSR2 #0004 -- ;&rom-ext ;scmp JSR2
|
||||
|
|
Loading…
Reference in a new issue