Chapter 13. Advanced Topics
170
%Cd
%Vl(a,0,70,70,14,1)
%s%acThere you have it: Album art.
%Vl(b,20,14,50,14,1)
%t(1)%acWarning:;%t(.1)
%Vl(b,20,30,50,50,1)
%sNo album art found
%scheck your filenames.
This example checks for album art. Album art will be displayed in viewport ‘a’, if it is
found. Otherwise a flashing warning will be displayed in viewport ‘b’.
Note:
The tag to display conditional viewports must come before the tag to preload the
b
viewport in the
.wps
file.
13.2.3. Info Viewport (SBS only)
As mentioned above, it is possible to set a UI viewport via the theme
.cfg
file. It is also
possible to set the UI viewport through the SBS file, and to conditionally select different
UI viewports.
•
%Vi(’label’,...)
This viewport is used as Custom UI Viewport in the case that
the theme doesn’t have a ui viewport set in the theme
.cfg
file. Having this is
strongly recommended since it makes you able to use the SBS with other themes.
If label is set this viewport can be selectivly used as the Info Viewport using the
%VI tag. The ‘. . . ’ parameters use the same logic as the
%V
tag explained above.
•
%VI(’label’)
Set the Info Viewport to use the viewport called label, as declared
with the previous tag.
13.2.4. Additional Fonts
Additional fonts can be loaded within each screen file to be used in that screen. In this
way not only can you have different fonts between e.g. the menu and the WPS, but you
can use multiple fonts in each of the individual screens.
%Fl(’id’,filename,glyphs)
•
‘id’ is the number you want to use in viewport declarations, 0 and 1 are reserved
and so can’t be used.
•
‘filename’ is the font filename to load. Fonts should be stored in
/.rockbox/fonts/
•
‘glyphs’ is an optional specification of how many unique glyphs to store in memory.
Default is from the system setting
Glyphs To Load
.
An example would be:
%Fl(2,12-Nimbus.fnt,100)
The Rockbox manual
(version 3.14)
Iaudio M5