[Feature] Skin engine Themes grab text from a file %ft(file, line) WIP

allow the skin engine to read text files and return a particular line

you then can use ss on that string to allow display of strings from the file
(Playername comes to mind)

able to be used as conditional
%?ft(filename)<Found|Not Found>

if (selected) line of file is empty the tag is treated as #COMMENT

scroll timeouts now persist thru trackchange

bugfix:
%t(n)%?x<text|text>
would ignore the specified timeout defaulting to 2 seconds

playername.txt generated at boot if it doesn't exist contents: 'RockBox!'

Change-Id: I961910e01be052ef902f77e6d92fc3e367ffe9d0
This commit is contained in:
William Wilgus 2024-12-03 11:42:46 -05:00 committed by Solomon Peachy
parent c754bc5870
commit 62b5dfd81d
32 changed files with 144 additions and 50 deletions

View file

@ -36,7 +36,7 @@
%ac%?ig<%ig|>
%ac%?fv<%(vbr%) |>%fb kbit/s %fc
%s%ac%?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>>
%ac%Sx(Next Track:)
%ac%t(300)%Sx(Next Track:);%ac%t(1)%ft(.rockbox/playername.txt)
%ac%s%?It<%It|%Fn>
#
# album art viewport
@ -54,7 +54,7 @@
# next track info - AA
%Vl(d,0,550,-,-200,-)
%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>
%t(300)%?C<%s%ac%Sx(Next:) %?Ia<%Ia|%?IA<%IA|%?D(2)<%D(2)|%(root%)>>> - %?It<%It|%Fn>|%s%ac%?Id<%Id|%?D(1)<%D(1)|%(root%)>>>;%s%ac%t(1)%ft(.rockbox/playername.txt)
# playtime
%V(20,660,440,36,-)