Support and General Use > Theming and Appearance Customization

Editing a theme - crashes when inserting "%Vp"

(1/1)

thrdhes:
Hi. I use the theme "plans" on a 5G iPod http://themes.rockbox.org/index.php?themeid=51&target=ipodvideo
However, I modify it to suit my needs better. Particularly, I'd like to display informations about the next tracks to be played.
At this point, here's the code that works fine for me (file "plans.wps") :

--- Code: ---%we
%X(bg.bmp)
%Cl(212,91,100,100)
%pb(9,194,310,16,pb.bmp)
%s%ac%?ia<%ia|%?d(2)<%d(2)|>>
%s%ac%?it<%it|%fn> %?in<%(%in%)|>
%s%ac%?id<%id|%?d(1)<%d(1)|>> %?iy<%(%iy%)|>

%ac%?ig<%ig - |> Codec : %fc %(%?fb<%fbkbps|>%)


%acPlaylist %(%pp/%pe%)
#%Vp(1, %pp %?ia<%ia:|%?d(2)<%d(2):|>>%?it<%it|%fn>)







%?C<%Vd(a)%Cd|%Vd(b)>

%al [ %pc %ac%pt %ar-%pr ]

--- End code ---

But then I need a viewport to display the "%Vp" in. And at this point I can't find a proper way to code it, the theme always crashes. May someone with a better understanding than mine help me to find the proper way to code that ? Thanks.

JdGordon:
I havnt had much rockbox time lately, but that definitly shouldnt be crashing.. file a bug

[Saint]:
It probably should be crashing from my understanding...

Or, at the very least there should be horrible draw issues...crashing is probably due to inability to render these horrors ;)

If I read that correctly, and my understanding of the %Vp tag is sound...would this .wps not be trying to draw the playlistviewer fullscreen, in the fullscreen (default) viewport?

Or...am I incorrect in thinking that %Vp always needs to be defined in it's own viewport? As that was my understanding.


Also, thrdhes, is that the *complete* .wps?

If it is...you're calling two viewports conditionally (identifiers a and b) that don't actually have viewport definitions...this should surely fail.


[St.]

thrdhes:
Hi men, thanks for your help.

St. > yes, this is the complete wps file, however the "%Vp" tag is commented as indeed, as you say, that tag needs to be defined in its own viewport. But that's where the problem is : I CANNOT succeed in creating the viewport to contain this tag, and that's why I ask help, I need someone who knows how to correctly declare the viewport (and other viewports if needed in consequence of the declaration of one viewport).

[Saint]:
That's not the only problem there...I'm going to assume you can't see it, so I'll explain further than I did last time.

the section:

--- Code: ---%?C<%Vd(a)%Cd|%Vd(b)>
--- End code ---

Is calling two viewports (for two different states (album art available/not)) that don't exist, Vd(a) and Vd(b), this will fail unless something changed fairly recently.

Regarding your question on defining viewports, the manual covers this, but I will briefly.

If the viewport isn't being displayed conditionally (ie. if it will always be displayed) we don't need to bother with an identifier so:

--- Code: ---%V(X,Y,width,height,font)
--- End code ---

X, Y is the X/Y coordinates of the screen in pixels, the top left corner of the screen is 0,0

width, height...pretty self explanitory, in pixels.

font, is either 0 for the system font, or 1 for the user selected font (it can also be 2~9 if another font is declared with the %Fl tag)


[St.]

Navigation

[0] Message Index

Go to full version