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
Search



Donate

Rockbox Technical Forums


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

Welcome to the Rockbox Technical Forums!

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

Author Topic: Progress bar + conditionals.  (Read 1968 times)

Offline Twilight in Zero

  • Member
  • *
  • Posts: 56
  • トワイライト・イン・ゼロ
Progress bar + conditionals.
« on: April 08, 2007, 05:36:56 PM »
Is it possible to use a progress bar inside a conditional? Was it ever possible? Will it ever be possible? I'm trying to use conditionals to position information depending on whether album art is present or not, and the progress bar is all that's broken.

Hate to start a new topic for such a short question, but that's all I got for you.
Logged
ロックボックスが愛してばよ!

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: Progress bar + conditionals.
« Reply #1 on: April 08, 2007, 06:21:04 PM »
In order: No, no, and I hope so.

I wish this was an option.  The progress bar is one of the few things (The only thing?) that you can't put inside a conditional.  About all you can do is put the progress bar on a line that's not affected by album art.
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline Twilight in Zero

  • Member
  • *
  • Posts: 56
  • トワイライト・イン・ゼロ
Re: Progress bar + conditionals.
« Reply #2 on: April 08, 2007, 07:30:59 PM »
*sigh.* Oh well. I guess I have to rethink where the bar will go. Or keep the info in one place.

Do you think I should go to the WPS tokenizer thread about this?
Logged
ロックボックスが愛してばよ!

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: Progress bar + conditionals.
« Reply #3 on: April 08, 2007, 08:17:46 PM »
Quote from: Twilight in Zero on April 08, 2007, 07:30:59 PM
Do you think I should go to the WPS tokenizer thread about this?
No clue.  I'd suspect no.  You could file a feature request assuming there isn't one already.
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline psycho_maniac

  • Member
  • *
  • Posts: 814
    • MyWebPage
Re: Progress bar + conditionals.
« Reply #4 on: April 09, 2007, 12:43:26 AM »
Couldn't you just have the progress bar below all your conditionals? What did you have in mind? I might be picturing it wrong.
Logged
Please SEARCH the wiki | Please read the Forum Guidelines | Please Read the Manual
I Own A Gigabeat F80

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: Progress bar + conditionals.
« Reply #5 on: April 09, 2007, 09:41:20 AM »
I imagine he wants to have the progress bar take up the full line if there's no album art, and only half the line (the half without the art on it) if there is album art.  Other themes do this with text, but none do it with the progress bar (because it's currently not possible).
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline Twilight in Zero

  • Member
  • *
  • Posts: 56
  • トワイライト・イン・ゼロ
Re: Progress bar + conditionals.
« Reply #6 on: April 09, 2007, 09:14:09 PM »
No, that's not it... Here's a picture of my WPS.



The information in the center is supposed to move down when there's album art. The area on the bottom has already been edited to make room. Everything works but the progress bar.
Logged
ロックボックスが愛してばよ!

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: Progress bar + conditionals.
« Reply #7 on: April 09, 2007, 10:48:36 PM »
Oh.

Same thing, though, really.  I assume you're doing it like so:

PSEUDOCODE:
Code: [Select]
if(albumart) {} else {title}
if(albumart) {} else {band}
if(albumart) {} else {album}
if(albumart) {title} else {progressbar}
if(albumart) {band} else {time}
if(albumart) {album} else {}
if(albumart) {progressbar} else {}
if(albumart) {time} else {}

Which is syntatically similar to what I thought you were doing:
Code: [Select]
if(albumart) {progressbar 100 wide} else {progressbar full width}
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline Twilight in Zero

  • Member
  • *
  • Posts: 56
  • トワイライト・イン・ゼロ
Re: Progress bar + conditionals.
« Reply #8 on: April 12, 2007, 12:54:38 PM »
Something like that. Except I just started using customline. The part we're concerned with looks like this:

Code: [Select]
# This is the part of the WPS used if Album Art is present.
# The %?C tag comes AFTER the customline -- VERY IMPORTANT!
%e|16|130|124|1|FFFFFF|%?C<%s%xda%?it<%it|Unknown Title>|>
%e|16|143|124|1|FFFFFF|%?C<%s%xdb%?ia<%ia|Unknown Artist>|>
%e|16|156|124|1|FFFFFF|%?C<%s%xdc%?id<%id|Unknown Album>|>
%?C<%pb|6|2|140|172||>
%e|2|181|138|1|FFFFFF|%?C<%al%pc%ar%pr|>
# This is the part of the WPS used if Album Art is NOT present.
%e|16|78|124|1|FFFFFF|%?C<|%s%xdX%?it<%it|Unknown Title>>
%e|16|91|124|1|FFFFFF|%?C<|%s%xdY%?ia<%ia|Unknown Artist>>
%e|16|104|124|1|FFFFFF|%?C<|%s%xdZ%?id<%id|Unknown Album>>
%?C<|%pb|6|2|140|120|>
%e|2|129|138|1|FFFFFF|%?C<|%al%pc%ar%pr>

Basically what I do is make all the customlines, and use conditionals to determine whether anything will actually be displayed on them or not.

%e doesn't work in conditionals, and it's ugly if I code it that way anyways.
Logged
ロックボックスが愛してばよ!

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

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.075 seconds with 14 queries.