Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Subline timing.
« previous next »
  • Print
Pages: [1]

Author Topic: Subline timing.  (Read 480 times)

Offline chuck_lardo

  • Member
  • *
  • Posts: 23
Subline timing.
« on: March 09, 2025, 04:17:37 AM »
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: [Select]


%t(3)%bl%%;%t(999999999) >



Cheers
Logged

Offline Dook

  • Member
  • *
  • Posts: 71
    • D00k.net
Re: Subline timing.
« Reply #1 on: March 09, 2025, 07:24:08 AM »
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.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1194
Re: Subline timing.
« Reply #2 on: March 09, 2025, 11:55:48 AM »
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
Logged

Offline chuck_lardo

  • Member
  • *
  • Posts: 23
Re: Subline timing.
« Reply #3 on: March 10, 2025, 03:27:39 AM »
Ok, cool.

This should do nicely.

Thanks guys  :D
Logged

Offline Dook

  • Member
  • *
  • Posts: 71
    • D00k.net
Re: Subline timing.
« Reply #4 on: March 15, 2025, 01:19:58 PM »
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: [Select]
%t(5)%Vs(invert);%t(655)%Vs(invert)Loading...
« Last Edit: March 15, 2025, 01:22:58 PM by Dook »
Logged

Offline Dook

  • Member
  • *
  • Posts: 71
    • D00k.net
Re: Subline timing.
« Reply #5 on: March 15, 2025, 01:21:10 PM »
Another option could be a mode where if the next subline doesn't have a %t tag, then stop the loop.

So %t(5)first line;second line
Logged

Offline chuck_lardo

  • Member
  • *
  • Posts: 23
Re: Subline timing.
« Reply #6 on: March 17, 2025, 06:09:29 AM »
Quote from: Dook on March 09, 2025, 07:24:08 AM
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.

I had a chance to try the above, but I couldn't get it to work. I'm pretty sure I had it set up correctly but there was no effect. It just displayed the first line indefinitely.

Either of these solutions would work perfectly.

Quote from: Dook on March 15, 2025, 01:21:10 PM
Another option could be a mode where if the next subline doesn't have a %t tag, then stop the loop.
So %t(5)first line;second line

Quote from: Dook on March 15, 2025, 01:21:10 PM
preventing the second line from switching back to the first entirely. Something like %t(2)first line;%t(-)second line

Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Subline timing.
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.059 seconds with 15 queries.