Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Recent skin additions

Recent skin additions

From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Fri, 20 Aug 2010 15:01:38 +1000

Hi all,
Its Friday and I'm bored at work, so I thought I'd let everyone know
about 3 biggish skin changes which happened in the last week or so in
case you missed them. (and one smaller changes)

So first, you can now use more descriptive names for images and
viewports instead of a single letter for the label (i.e %V(sneaky,
0,0,-,8,1) ). There is a minor caveat with image labels though (read
on for that....)

Bar type tags (like the progressbar, volume and battery level bars)
have been given a bunch of new options. The big ones are that you can
now draw bars vertically, backwards (fill right to left), and draw
then with a slider image which moves with the bars fill position. (see
http://www.rockbox.org/wiki/CustomWPS#Bar_Tags )

Next is a big update to the %xd() tag (display a preloaded image).
I personally found %?mp<%xd(Aa)|%xd(Ab)|....|%xd(Ag)> difficult to
read and prone to errors, so what I have done is modified %xd to let
you do exactly the same with a single tag. %xd(A, %mp) checks the
value of %mp (pretending it is inside a conditional) and uses that
value as the subimage number from the A image to draw. %xl() needs no
changes for this to work. An optional 3rd param can be given for an
offset to use so you can skip some images at the start (%xd(A, %mp, 2)
will show the 3rd image for the first value of %mp, -1 will show
nothing for the first value and the 1st subimage for the next).

I mentioned a caveat for image labels if you want to use more than a
single letter for the image label. if you have an image labeled
"playbackmode" you can't do %xd(playbackmodea) anymore (i.e equivalent
to %xd(Aa) ), instead you can just use a number for the second param
(so %xd(playbackmode, 1) == %xd(Aa) ). Of course you can also do
%xd(A, 1) if you prefer numbers to letter for counting also.

And lastly, a brand new tag which lets you do logical comparisons with
tags: %if() (see
http://www.rockbox.org/wiki/CustomWPS#if_logical_comparison_tag ).
Basically this tag lets you use tags as proper variables to do some
fun stuff with. An example is using it to check if the current tracks
artist is the same as next tracks you might want to display something
different. Or if the volume is higher than some value you might want
to warn the user. I cant imagine all the uses for this but looking
forward to seeing interesting uses :)

Enjoy, TGIF :)

Jonathan
-------------------------------------------------------------------
Unsubscribe: http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox
FAQ: http://www.rockbox.org/twiki/bin/view/Main/GeneralFAQ
Etiquette: http://www.rockbox.org/mail/etiquette.html
Received on 2010-08-20


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa