Samsung YH-920 Manual page 170

Rockbox firmware manual
Hide thumbs Also See for YH-920:
Table of Contents

Advertisement

Chapter 13. Advanced Topics
Lines beginning with # are comments and will be ignored.
Note: Keep in mind that your player's resolution is 160 128 2 (with the last number
giving the colour depth in bits) when designing your own WPS, or if you use a WPS
designed for another target.
Viewports
By default, a viewport filling the whole screen contains all the elements defined in each
theme file. The elements in this viewport are displayed with the same background/
foreground shades and the text is rendered in the same font as in the main menu. To
change this behaviour a custom viewport can be defined. A viewport is a rectangular
window on the screen with its own foreground/background shades. This window also
has variable dimensions. To define a viewport a line starting %V(... has to be present
in the theme file. The full syntax will be explained later in this section. All elements
placed before the line defining a viewport are displayed in the default viewport. Elements
defined after a viewport declaration are drawn within that viewport. Loading images
(see Appendix section
A viewport ends either with the end of the file, or with the next viewport declaration
line. Viewports sharing the same coordinates and dimensions cannot be displayed at the
same time. Viewports cannot be layered transparently over one another. Subsequent
viewports will be drawn over any other viewports already drawn onto that area of the
screen.
Viewport Declaration Syntax
%V(x,y,[width],[height],[font]) %Vf([fgshade]) %Vb([bgshade])
%Vf and %Vb set the foreground and background shade of grey respectively.
'fgshade' and 'bgshade' are numbers in the range 0 (= black) to 3 (= white).
'font' is a number: 0 is the built-in system font, 1 is the current menu font, and
2-9 are additional skin loaded fonts (see section
Only the coordinates have to be specified. Leaving the other definitions blank will
set them to their default values.
Note: The correct number of commas with hyphens in blank fields are still needed.
%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.
The Rockbox manual
D.21
(page 198)) should be done within the default viewport.
Example
(version 3.14)
13.2.4
(page 172)).
Samsung YH-920
170

Advertisement

Table of Contents
loading

Table of Contents