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
| | |-+  WPS coding help: Blinking song title while on pause
« previous next »
  • Print
Pages: [1]

Author Topic: WPS coding help: Blinking song title while on pause  (Read 1556 times)

Offline verdigris

  • Member
  • *
  • Posts: 10
WPS coding help: Blinking song title while on pause
« on: August 01, 2008, 04:28:47 PM »
Hello,
I am trying to make the title blink when the player is paused, but nothing I've tried has really worked so far. Could someone pinpoint what's wrong with my code? Thanks!
Code: [Select]
#Disable Statusbar
%wd
#Load images
# Battery
%xl|B|battery.bmp|1|119|6|
# Repeat
%xl|R|repeat.bmp|15|119|4|
# Shuffle
%xl|S|shuffle.bmp|21|119|

#Track info
%s%ac%?mp<%?it<%it|->|%?it<%it|->|%Vdp|%?it<%it|->|%?it<%it|->?
#Play bar

%ac%?px<•|• •|• • •|• • • •|• • • • •|• • • • • •|• • • • • • •|• • • • • • • •|• • • • • • • • •|• • • • • • • • • •>

#Track info
%s%ac%?ia<%ia|%?ic<%ic|->> • %?id<%id|->

#Player/control status
%?bs<%bs|%?bp<%xdBa|%?bc<%xdBa|%?bl<%xdBb|%xdBc|%xdBd|%xdBe|%xdBf>>>>
%?mm<|%xdRa|%xdRb|%xdRc|%xdRd>
%?ps<%xdS>

#Load conditional viewport for pause
%V|p|0|18|160|12|1|
%s%ac%?it<%t2%it;%t1 |%t2-;%t1 >
« Last Edit: August 02, 2008, 11:24:04 PM by verdigris »
Logged

Offline MarcGuay

  • Rockbox Expert
  • Member
  • *
  • Posts: 1065
Re: WPS coding help
« Reply #1 on: August 01, 2008, 04:36:52 PM »
What happens now?  Does it display at all or fall back to the default?  You have an extra question mark at the end of the Track Info line.
Logged

Offline verdigris

  • Member
  • *
  • Posts: 10
Re: WPS coding help
« Reply #2 on: August 02, 2008, 11:23:39 PM »
Hihi!
Thanks for the prompt reply and for picking out the extra "?". The screen would revert to the default WPS which, I am assuming, means that some part of the code doesn't make sense (sorry, don't know the technical term for a code that doesn't work  :P).

I did some testing and think the problem seems to be with conditional viewports. I tried disabled the viewport code and replaced "Vdp" with "Pause":
Code: [Select]
#Disable Statusbar
%wd
#Load images
# Battery
%xl|B|battery.bmp|1|119|6|
# Repeat
%xl|R|repeat.bmp|15|119|4|
# Shuffle
%xl|S|shuffle.bmp|21|119|

#Track info (Title)
%s%ac%?mp<%?it<%it|->|%?it<%it|->|pause|%?it<%it|->|%?it<%it|->>
#Play bar

%ac%?px<•|• •|• • •|• • • •|• • • • •|• • • • • •|• • • • • • •|• • • • • • • •|• • • • • • • • •|• • • • • • • • • •>

#Track info (Artist • Album)
%s%ac%?ia<%ia|%?ic<%ic|->> • %?id<%id|->

#Player/control status
%?bs<%bs|%?bp<%xdBa|%?bc<%xdBa|%?bl<%xdBb|%xdBc|%xdBd|%xdBe|%xdBf>>>>
%?mm<|%xdRa|%xdRb|%xdRc|%xdRd>
%?ps<%xdS>

#Load conditional viewport for pause
#%V|p|0|18|160|12|1|
#%s%ac%?it<%t2%it;%t1 |%t2-;%t1 >
#Pause

Everything works, except that even if I pause the song, "Pause" doesn't show up; the title remains as it is  ???
Logged

Offline BdN3504

  • Artist
  • Member
  • *
  • Posts: 323
Re: WPS coding help: Blinking song title while on pause
« Reply #3 on: August 03, 2008, 06:12:18 AM »
%V|p|0|18|160|12|1|

this line is wrong. %V creates a viewport (you can't use letters if you choose that option). %Vl loads a viewport. I think you accidentally forgot the "l". But this line won't work, even if you correct %V to %Vl, because you forgot to define the colour (RGB888) parameters;

The line MUST look like this to work:

%Vl|p|0|18|160|50|1|-|-|

even if you don't care about colours, you have to use the brackets and the hyphen, otherwise the wps parser does not understand that it's dealing with a viewport declaration.

if you want to use conditionals with alternating sublines, you have to put the time definitions before the conditionals:

%s%ac%?it<%t2%it;%t1 |%t2-;%t1 >

%s%t2%ac%?it<%it|->;%t1%ac%?it< | >;

i created a viewport for you, this should work, but i don't know if it is what you want...

Code: [Select]
%ar%?mp<-|%?it<%it|->|%Vdp|-|->

%Vl|p|0|18|160|50|1|-|-|
%s%t2%ac%?it<%it|->;%t1%ac%?it< | >
Pause

Logged

Offline verdigris

  • Member
  • *
  • Posts: 10
Re: WPS coding help: Blinking song title while on pause
« Reply #4 on: August 04, 2008, 09:22:13 PM »
Hi again,
Thanks so much for the help. The WPS actually works now instead of defaulting to the default WPS theme. ^__^

New problems have cropped out though:
1. When pause is on, the conditional viewport is loaded, but its contents aren't loaded. I.e. it's a blank instead of blinking. I have tried disabling the code for blinking and just put "Pause" there as text, but that didn't work either.
2. Images are no longer loading. The Wiki said that the default viewport can't be used with texts, so I'm assuming that images still work in the main viewport.  I don't think the additional viewports overlap with the image locations (my screen is 160x128, mono) so I'm not sure where I've gone wrong.

Current code:
Code: [Select]
#Disable Statusbar
%wd
#Load images
# Battery
%xl|B|battery.bmp|1|119|6|
# Repeat
%xl|R|repeat.bmp|15|119|4|
# Shuffle
%xl|S|shuffle.bmp|21|119|
#Load conditional viewport for pause
%Vl|p|0|18|160|30|1|-|-|
#%s%ac%t2%?it<%it|->;%t1
Pause

#Main viewport
%V|0|0|-|100|1|-|-|

#Track info (Title)
%ac%?mp<%?it<%it|->|%?it<%it|->|%Vdp|%?it<%it|->|%?it<%it|->>
#Play bar

%ac%?px<•|• •|• • •|• • • •|• • • • •|• • • • • •|• • • • • • •|• • • • • • • •|• • • • • • • • •|• • • • • • • • • •>

#Track info (Artist • Album)
%s%ac%?ia<%ia|%?ic<%ic|->> • %?id<%id|->

#Player/control status
%?bs<%bs|%?bp<%xdBa|%?bc<%xdBa|%?bl<%xdBb|%xdBc|%xdBd|%xdBe|%xdBf>>>>
%?mm<|%xdRa|%xdRb|%xdRc|%xdRd>
%?ps<%xdS>

Thanks very much for all the help so far!
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  WPS coding help: Blinking song title while on pause
 

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

Page created in 0.074 seconds with 15 queries.