Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: akki007 on August 11, 2006, 10:59:23 AM

Title: WPS Help!
Post by: akki007 on August 11, 2006, 10:59:23 AM
I can't get the album and genre images to appear in the WPS below. The Album and Song title images are working but the other two will not appear!

%x|a|RockBoxWPSd.bmp|0|0|
%wd
%ar  %?mp<Stop|Play|Pause|%>%>|%<%<>     

%xda    %?ia<%ia|%d2>
%xdb    %?id<%id|%d1>
%xdc    %?in<(%in) |>%?it<%it|%fn>
%xdg    %?ig<%t8 Genre: %ig %?iy<(%iy)|%t0>|%?iy<%t8* Year: %iy|%t0>%t0>;%?ic<%t8* By: %ic|%t0>

%ac%pr/%pt        %?pp<[%pp/%pe]|>
%pb
%ar%fc   %?fb<%?fv<%fbK VBR| %fbK >|>   

%?Ia<* %Ia|%?D2<* %D2|>>
%?It<* %?In<(%In) |>%It|%?Fn<* %?In<(%In) |>%Fn|>>

%al     %pv  %?mm<%?ps<(Shuffle)|>|%?ps<(Sfl All)|(Rpt All)>|(Rpt 1)|%?ps<(Shuffle)|(Rpt Sfl)>|(A-B Rpt)>
%al     %t15%bl  (%bt)

%xl|a|artist.bmp|0|16|
%xl|b|album.bmp|0|24|
%xl|c|track.bmp|0|32|
%xl|f|genre.bmp|0|40|
Title: Re: WPS Help!
Post by: Yotto on August 23, 2006, 02:46:59 AM
I'll post more as I look over your WPS, but:

%x|a|RockBoxWPSd.bmp|0|0|

displays RockBoxWPSd.bmp, and then

%xl|a|artist.bmp|0|16|

Tries to load a bitmap into the same "a" variable.  That's a no-no.  also, while I don't know if it's required, generally people do all the loading of images FIRST, before any WPS code.

***EDIT***

Also, you don't have a %xl|g| anywhere, so how is your %xdg supposed to load it?

That should take care of both of those red hilights.

***EDIT***

While we're at it, is RockBoxWPSd.bmp a fullscreen bitmap for your background?  If so, you should be using:

%X|RockBoxWPSd.bmp|

to display it.

Also, with static images, assuming you have a background image you should put them into it (acutally paste them into the image in your image editing software).  This will save memory for your music, meaning less HDD accesses and longer battery life.

*** EDIT ***

This post is like 11 days old, why am I putting so much time into replying to it?  I got tricked by a 'new' tag!
Title: Re: WPS Help!
Post by: NPswimdude500 on August 25, 2006, 11:58:49 AM
also, while I don't know if it's required, generally people do all the loading of images FIRST, before any WPS code.

There are certainly no rules as to where image code should go, but Yotto makes an excellent point. It's much cleaner and easier to look at if all the image tags are in the same place. What you're trying to do is position your code so that it's laid out like your WPS. As long as the image coordinates are correct, you really don't have to - those images will be loaded where the coordinates indicate.