Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: fallenturtle on January 03, 2011, 01:08:17 PM

Title: conditional check for playback status?
Post by: fallenturtle on January 03, 2011, 01:08:17 PM
I have some elements in my sbs that I don't want to appear when there is no file playing. More specifically I have the track length in parenthesis (so when no song is playing there is just a () displayed) and the remaining time has a "-" prefix which looks odd when there is no time displayed after it.

Is there a conditional I can setup to hide these elements when a song is playing?

Thanks.
Title: Re: conditional check for playback status?
Post by: [Saint] on January 03, 2011, 11:31:20 PM
I have some elements in my sbs that I don't want to appear when there is no file playing. More specifically I have the track length in parenthesis (so when no song is playing there is just a () displayed) and the remaining time has a "-" prefix which looks odd when there is no time displayed after it.

Is there a conditional I can setup to hide these elements when a song is playing?

Thanks.

You can display these elements conditionally with the %mp tag:

%?mp<Stop|Play|Pause|Fast Forward|Rewind|Recording|Recording Paused|FM Play|FM Mute>

Make the elements you want to display conditional to this tag, only call the elements you want displayed in the sections that match the situations you want them displayed in.

%?mp<%xd(foo)|%xd(bar)|%xd(baz)|%acdisplay some text here|%<some_tag>|%?<some_conditional true|some_conditional false>|...etc.|...etc|...etc>



[St.]