Support and General Use > Theming and Appearance Customization
Subline timing.
chuck_lardo:
Is it possible to have a subline that will display indefinitely?
I would like the first line to show for 3s then the second for the remaining time.
At the moment I have the second line showing for a large number of seconds.
It works but I was hoping there was a more elegant way to achieve this.
--- Code: ---
%t(3)%bl%%;%t(999999999) >
--- End code ---
Cheers
Dook:
https://gerrit.rockbox.org/r/c/rockbox/+/6153
This recent change to the t tag might be of help? According to Bilgus' notes the regular use maxes out at 655 seconds, so the only way to get a longer timeout is to use this newer method. I remember from a conversation in the IRC channel though that he only recommended to use it once or twice in a theme since it's a very expensive tag performance wise.
Bilgus:
The long form of %t(show, hide) goes up to about ~100 minutes
%t(3, 360000) would show for 3 seconds then not again for 100 minutes
and Dook remembers correctly that the overhead is higher for this form
as it has extra space required and extra processing too
but as long as you don't go crazy with it you probably won't notice the difference
chuck_lardo:
Ok, cool.
This should do nicely.
Thanks guys :D
Dook:
Thinking about this today after I ran into a similar problem to solve. There are situations where you want to have an indefinite display of a subline, so in my case I wanted to only display a "loading" message if the disk has been accessed for more than 5 seconds. I can max out the second tag, but it does require knowledge of the tag's limits which might be hard to find. It might make sense for the %t tag to have mode that lets you shorthand the maximum value or preventing the second line from switching back to the first entirely. Something like %t(2)first line;%t(-)second line
The loading message code I was writing for reference:
--- Code: ---%t(5)%Vs(invert);%t(655)%Vs(invert)Loading...
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version