Chapter 13. Advanced Topics
169
Example
%V(12,20,-,-,1) %Vf(0) %Vb(3)
%sThis viewport is displayed permanently. It starts 12px from the left and
%s20px from the top of the screen, and fills the rest of the screen from
%sthat point. The lines will scroll if this text does not fit in the viewport.
%sThe user font is used, the foreground colour is set to black and the
%sbackground is set to white.
Viewport definition
Default value
width/height
remaining part of screen
font
user defined
shade
black
foreground
on
white
background
Viewport Line Text Styles
Tag
Description
%Vs(mode[,param])
Set the viewport text style to ‘mode’ from this point forward
Mode can be the following:
Mode
Description
clear
Restore the default style
invert
Draw lines inverted
color
Draw the text coloured by the value given in ‘param’.
Functionally equivalent to using the %Vf() tag
Conditional Viewports
Any viewport can be displayed either permanently or conditionally. Defining a viewport
as
%V(...
will display it permanently.
•
%Vl(’identifier’,...)
This tag preloads a viewport for later display. ‘identifier’
is a single lowercase letter (a-z) and the ‘. . . ’ parameters use the same logic as the
%V
tag explained above.
•
%Vd(’identifier’)
Display the ‘identifier’ viewport.
Viewports can share identifiers so that you can display multiple viewports with one
%Vd line.
Example
%?C<%Vd(a)|%Vd(b)>
%Vl(a,10,10,50,50,-)
%Cl(0,0,50,50,c,c)
The Rockbox manual
(version 3.14)
Iaudio M5