New feature for the %xd() (display a preloaded image) skin tag.

It can now automatically load the correct subimage from a strip (assuming the strip is in the correct order)  by giving a tag for the 2nd param.
example: %xd(F, %mp) which is equivilant to %?mp<%xd(Fa)|%xd(Fb)|%xd(Fc)|%xd(Fd)|%xd(Fe)>
You can also set the subimage offset.. i.e %xd(E, %mm, -1) which means "show nothing for the first value of %mm and use the bitmap strip for the remaining values"

if a tag+offset is <0 or greater than the number of subimages in a strip he image is cleared (I'm open to changing this if someone has a better idea)

cabbiev2.176x220x16.wps is an example of how to use this

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27717 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-08-05 11:28:48 +00:00
parent 145571d9b5
commit 3f8e7fc26f
6 changed files with 75 additions and 23 deletions

View file

@ -27,10 +27,10 @@
%?C<%s%ac%?id<%id|%?d(1)<%d(1)|%(root%)>>|>
%al %pc%ac%?Sr<%pe %Sx(of) %pp|%pp %Sx(of) %pe>%ar%pr
%?mh<%xd(Aa)|%xd(Ab)>
%xd(A, %mh)
%?bp<%?bc<%xd(Ba)|%xd(Bb)>|%?bl<|%xd(Bc)|%xd(Bd)|%xd(Be)|%xd(Bf)|%xd(Bg)|%xd(Bh)|%xd(Bi)|%xd(Bj)>>
%?pv<%xd(Ca)|%xd(Cb)|%xd(Cc)|%xd(Cd)|%xd(Ce)|%xd(Cf)|%xd(Cg)|%xd(Ch)|%xd(Ci)|%xd(Cj)>
%?ps<%xd(D)>
%?mm<|%xd(Ea)|%xd(Eb)|%xd(Ec)|%xd(Ed)>
%?mp<%xd(Fa)|%xd(Fb)|%xd(Fc)|%xd(Fd)|%xd(Fe)>
%xd(E, %mm, -1)
%xd(F, %mp)
%?C<%Cd>