rockbox/manual/advanced_topics/viewports/colour-vp-syntax.tex
William Wilgus acff6143c4 FS#13938 - Line disappears after %Vf tag and %Vb tag
As far as I can tell this was indtroduced during this commit
32ff4e93bd
basically they added a NOBREAK flag
to all the commands that had '\n'
where as
    { SKIN_TOKEN_VIEWPORT_FGCOLOUR,       "Vf" , "S"},
    { SKIN_TOKEN_VIEWPORT_BGCOLOUR,       "Vb" , "S"},
do not have \n yet they were changed to have the NOBREAK flag applied
    { SKIN_TOKEN_VIEWPORT_FGCOLOUR,       "Vf" , "S", NOBREAK },
    { SKIN_TOKEN_VIEWPORT_BGCOLOUR,       "Vb" , "S", NOBREAK },
this causes anything after the command to be ignored

-- Note added to manual this will be a won't fix
due to the possibility of breaking existing themes

Change-Id: I0135f04c344bf817c104f951a657e2690f2d36bb
2026-06-30 13:55:03 -04:00

39 lines
1.9 KiB
TeX

\subsubsection{Viewport Declaration Syntax}
\config{\%V(x,y,[width],[height],[font]) \%Vf([fgcolour]) \%Vb([bgcolour]) %
\%Vg(start, end [,text])}%
\begin{itemize}
\item \%Vf and \%Vb set the foreground and background colours respectively.
\item `fgcolour' and `bgcolour' are 6-digit RGB888 colours, e.g. FF00FF.
\item \%Vg defines a gradient fill that can then be used with the \%Vs tag.
`start' and `end' set the initial and final colours, and the optional `text'
sets the text colour. Colours are 6-digit RGB888, e.g. FF00FF.
\item `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
\reference{ref:multifont}).
\item Only the coordinates \emph{have} to be specified. Leaving the other
definitions blank will set them to their default values.
\end{itemize}
\note{The correct number of commas with hyphens in
blank fields are still needed.}
\note{Any text or tags after \%Vf() or \%Vb() may or may not display depending
on context thus text or tags following on the same line should be avoided,
this behavior preserves backward compatibility.}
\begin{example}
%V(12,20,-,-,1) %Vf(000000) %Vb(FFFFFF) %Vg(FFC0CB, FF0000, FFFF00)
%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, and the foreground and background are set to black
%sand white respectively. The line gradient is set to pink to red with yellow
%text.
\end{example}
\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{}
width/height & remaining part of screen \\
font & user defined \\
foreground/background colours & defined by theme \\
\end{rbtabular}