summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/wps_internals.h
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-08-05 11:28:48 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-08-05 11:28:48 +0000
commit3f8e7fc26fdecde65fb78de84e4df31df8c0e750 (patch)
tree7f2c2d93d72d4f7a3dade4ccdd9a81433f5abe05 /apps/gui/skin_engine/wps_internals.h
parent145571d9b5c2b6b1028fbb95388f933a3675ebfa (diff)
downloadrockbox-3f8e7fc26fdecde65fb78de84e4df31df8c0e750.tar.gz
rockbox-3f8e7fc26fdecde65fb78de84e4df31df8c0e750.zip
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
Diffstat (limited to 'apps/gui/skin_engine/wps_internals.h')
-rw-r--r--apps/gui/skin_engine/wps_internals.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index 709dbc6ff7..e42fc5a53b 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -49,6 +49,9 @@
49#define WPS_ALIGN_CENTER 64 49#define WPS_ALIGN_CENTER 64
50#define WPS_ALIGN_LEFT 128 50#define WPS_ALIGN_LEFT 128
51 51
52
53#define TOKEN_VALUE_ONLY 0xDEADD0D0
54
52#ifdef HAVE_ALBUMART 55#ifdef HAVE_ALBUMART
53 56
54/* albumart definitions */ 57/* albumart definitions */
@@ -80,6 +83,12 @@ struct gui_img {
80 int display; 83 int display;
81}; 84};
82 85
86struct image_display {
87 char label;
88 int subimage;
89 struct wps_token *token; /* the token to get the subimage number from */
90 int offset; /* offset into the bitmap strip to start */
91};
83 92
84struct progressbar { 93struct progressbar {
85 enum skin_token_type type; 94 enum skin_token_type type;