Chapter 13. Advanced Topics
174
Example
%s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds,
Display id3 title for 2 seconds,
Display current and remaining track time
for 3 seconds,
repeat...
Conditionals can be used with sublines to display a different set and/or number of
sublines on the line depending on the evaluation of the conditional. Example subline
with conditionals:
Example
%?it<%t(8)%s%it|%s%fn>;%?ia<%t(3)%s%ia|%t(0)>
The format above will do two different things depending if ID3 tags are present. If
the ID3 artist and title are present:
•
Display id3 title for 8 seconds,
•
Display id3 artist for 3 seconds,
•
repeat. . .
If the ID3 artist and title are not present:
•
Display the filename continuously.
Note that by using a subline display time of 0 in one branch of a conditional, a subline
can be skipped (not displayed) when that condition is met.
Using Images
You can have as many as 52 images in your WPS. There are various ways of displaying
images:
1. Load and always show the image, using the
%x
tag
2. Preload the image with
%xl
and show it with
%xd
. This way you can have your
images displayed conditionally.
3. Load an image and show as backdrop using the
%X
tag. The image must be of the
same exact dimensions as your display.
Example on background image use:
Example
%X(background.bmp)
The image with filename
background.bmp
is loaded and used in the WPS.
Example on bitmap preloading and use:
The Rockbox manual
(version 3.14)
Samsung YH-920