From 64d4ddf2161f21239539a17705d83478297254f8 Mon Sep 17 00:00:00 2001 From: Alex Parker Date: Sun, 20 Jun 2010 12:58:41 +0000 Subject: Convert the manual to the new theme syntax. As a result, adds the viewport colour tags which closes FS#11372. Correct multifont tag from %F to %Fl git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26989 a1c6a512-1295-4272-9138-f99709370657 --- manual/advanced_topics/main.tex | 46 ++++---- .../viewports/colour-conditional.tex | 16 +-- .../advanced_topics/viewports/colour-vp-syntax.tex | 9 +- .../viewports/grayscale-conditional.tex | 16 +-- .../viewports/grayscale-vp-syntax.tex | 9 +- .../advanced_topics/viewports/mono-conditional.tex | 12 +-- .../advanced_topics/viewports/mono-vp-syntax.tex | 6 +- manual/appendix/wps_tags.tex | 118 ++++++++++----------- 8 files changed, 113 insertions(+), 119 deletions(-) (limited to 'manual') diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex index 8580fc54b8..78cc32d90d 100644 --- a/manual/advanced_topics/main.tex +++ b/manual/advanced_topics/main.tex @@ -231,7 +231,7 @@ are discussed below. \subsubsection{\label{ref:Viewports}Viewports} By default, a viewport filling the whole screen contains all the elements -defined in the \fname{.wps} file. The +defined in each theme file. The \opt{lcd_non-mono}{elements in this viewport are displayed with the same background/\linebreak{}foreground \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the} @@ -241,8 +241,8 @@ be defined. A viewport is a rectangular window on the screen% \opt{lcd_non-mono}{ with its own foreground/background \opt{lcd_color}{colours}\nopt{lcd_color}{shades}}. This window also has variable dimensions. To -define a viewport a line starting \config{{\%V{\textbar}\dots}} has to be -present in the \fname{.wps} file. The full syntax will be explained later in +define a viewport a line starting \config{{\%V(\dots}} 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. @@ -263,15 +263,15 @@ area of the screen. \subsubsection{Conditional Viewports} Any viewport can be displayed either permanently or conditionally. -Defining a viewport as \config{{\%V{\textbar}\dots}} +Defining a viewport as \config{{\%V(\dots}} will display it permanently. \begin{itemize} -\item {\config{\%Vl{\textbar}'identifier'{\textbar}\dots{\textbar}}} +\item {\config{\%Vl(`identifier',\dots)}} This tag preloads a viewport for later display. `identifier' is a single lowercase letter (a-z) and the `\dots' parameters use the same logic as the \config{\%V} tag explained above. -\item {\config{\%Vd'identifier'}} Display the `identifier' viewport. +\item {\config{\%Vd(`identifier')}} Display the `identifier' viewport. \end{itemize} Viewports can share identifiers so that you can display multiple viewports @@ -292,7 +292,7 @@ As mentioned above, it is possible to set a UI viewport via the theme file, and to conditionally select different UI viewports. \begin{itemize} - \item {\config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}}} + \item {\config{\%Vi(`label',\dots)}} This viewport is used as Custom UI Viewport in the case that the theme doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this is strongly recommended since it makes you able to use the SBS @@ -300,7 +300,7 @@ file, and to conditionally select different UI viewports. Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as the \config{\%V} tag explained above. - \item {\config{\%VI'label'}} Set the Info Viewport to use the viewport called + \item {\config{\%VI(`label')}} Set the Info Viewport to use the viewport called label, as declared with the previous tag. \end{itemize} @@ -309,7 +309,7 @@ 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.\\ -\config{\%F{\textbar}id{\textbar}filename{\textbar}} +\config{\%Fl(`id',filename)} \begin{itemize} \item `id' is the number you want to use in viewport declerations, 0 and 1 @@ -318,7 +318,7 @@ and the WPS, but you can use multiple fonts in each of the individual screens.\\ \fname{/.rockbox/fonts/} \end{itemize} - An example would be: \config{\%F{\textbar}2{\textbar}12-Nimbus.fnt{\textbar}} + An example would be: \config{\%Fl(2,12-Nimbus.fnt)} } @@ -383,8 +383,8 @@ Subline related special characters and tags: \begin{description} \item[;] Split items on a line into separate sublines \item[\%t] Set the subline display time. The -`\config{\%t}' is followed by either integer -seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}). +`\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds +and tenths of a second within () e.g. (\config{\%t(3.5)}). \end{description} Each alternating subline can still be optionally scrolled while it is @@ -393,7 +393,7 @@ line with non{}-scrollable formats (such as track elapsed time) as long as they are separated into different sublines. Example subline definition: \begin{example} - %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds, + %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, @@ -404,7 +404,7 @@ 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: \begin{example} - %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\ + %?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\ \end{example} The format above will do two different things depending if ID3 tags are @@ -438,19 +438,19 @@ displaying images: % command. Example on background image use: \begin{example} - %X|background.bmp| + %X(background.bmp) \end{example} The image with filename \fname{background.bmp} is loaded and used in the WPS. }% Example on bitmap preloading and use: \begin{example} - %x|a|static_icon.bmp|50|50| - %xl|b|rep\_off.bmp|16|64| - %xl|c|rep\_all.bmp|16|64| - %xl|d|rep\_one.bmp|16|64| - %xl|e|rep\_shuffle.bmp|16|64| - %?mm<%xdb|%xdc|%xdd|%xde> + %x(a,static_icon.bmp,50,50) + %xl(b,rep\_off.bmp,16,64) + %xl(c,rep\_all.bmp,16,64) + %xl(d,rep\_one.bmp,16,64) + %xl(e,rep\_shuffle.bmp,16,64) + %?mm<%xd(b)|%xd(c)|%xd(d)|%xd(e)> \end{example} Four images at the same x and y position are preloaded in the example. Which image to display is determined by the \config{\%mm} tag (the repeat mode). @@ -467,8 +467,8 @@ title [artist]''. %\opt{lcd_bitmap}{ % \begin{verbatim} % %s%?it<%?in<%in. |>%it|%fn> -% %s%?ia<%ia|%?d2<%d2|(root)>> -% %s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|> +% %s%?ia<%ia|%?d2<%d(2)|(root)>> +% %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|> % % %al%pc/%pt%ar[%pp:%pe] % %fbkBit %?fv %?iv<(id3v%iv)|(no id3)> diff --git a/manual/advanced_topics/viewports/colour-conditional.tex b/manual/advanced_topics/viewports/colour-conditional.tex index f8fc1fa50a..d864194205 100644 --- a/manual/advanced_topics/viewports/colour-conditional.tex +++ b/manual/advanced_topics/viewports/colour-conditional.tex @@ -1,13 +1,13 @@ \begin{example} - %?C<%Vda|%Vdb> - %Vl|a|10|10|50|50|-|-|-| - %Cl|0|0|50|50| - %C - %Vl|a|0|70|70|14|1|-|-| + %?C<%Vd(a)|%Vd(b)> + %Vl(a,10,10,50,50,-) + %Cl(0,0,50,50,c,c) + %Cd + %Vl(a,0,70,70,14,1) %s%acThere you have it: Album art. - %Vl|b|20|14|50|14|1|ff0000|ffffff| - %t1%acWarning:;%t.1 - %Vl|b|20|30|50|50|1|000000|ffffff| + %Vl(b,20,14,50,14,1) %Vf(ff0000) %Vb(ffffff) + %t(1)%acWarning:;%t(.1) + %Vl(b,20,30,50,50,1) %Vf(000000) %Vb(ffffff) %sNo album art found %scheck your filenames. \end{example} diff --git a/manual/advanced_topics/viewports/colour-vp-syntax.tex b/manual/advanced_topics/viewports/colour-vp-syntax.tex index 10b879241b..e6d0c82cf8 100644 --- a/manual/advanced_topics/viewports/colour-vp-syntax.tex +++ b/manual/advanced_topics/viewports/colour-vp-syntax.tex @@ -1,6 +1,6 @@ \subsubsection{Viewport Declaration Syntax} -\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}}% +\config{\%V(x,y,[width],[height],[font]) \%Vf([fgcolour]) \%Vb([bgcolour])}% \begin{itemize} \item `fgcolour' and `bgcolour' are 6-digit RGB888 colours, e.g. FF00FF. @@ -11,15 +11,16 @@ definitions blank will set them to their default values. \end{itemize} -\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in +\note{The correct number of commas with hyphens in blank fields are still needed in any case.} \begin{example} - %V|12|20|-|-|1|-|-| + %V(12,20,-,-,1) %Vf(000000) %Vb(FFFFFF) %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, as are the default foreground/background colours. + %sThe user font is used, and the foreground and background are set to black + %sand white respectively. \end{example} \begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{} width/height & remaining part of screen \\ diff --git a/manual/advanced_topics/viewports/grayscale-conditional.tex b/manual/advanced_topics/viewports/grayscale-conditional.tex index acca85a9e7..698f815172 100644 --- a/manual/advanced_topics/viewports/grayscale-conditional.tex +++ b/manual/advanced_topics/viewports/grayscale-conditional.tex @@ -1,13 +1,13 @@ \begin{example} - %?C<%Vda|%Vdb> - %Vl|a|10|10|50|50|-|-|-| - %Cl|0|0|50|50| - %C - %Vl|a|0|70|70|14|1|-|-| + %?C<%Vd(a)|%Vd(b)> + %Vl(a,10,10,50,50,-) + %Cl(0,0,50,50,c,c) + %Cd + %Vl(a,0,70,70,14,1) %s%acThere you have it: Album art. - %Vl|b|20|14|50|14|1|2|-| - %t1%acWarning:;%t.1 - %Vl|b|20|30|50|50|1|-|-| + %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. \end{example} diff --git a/manual/advanced_topics/viewports/grayscale-vp-syntax.tex b/manual/advanced_topics/viewports/grayscale-vp-syntax.tex index a8460703a9..1c0c8bf532 100644 --- a/manual/advanced_topics/viewports/grayscale-vp-syntax.tex +++ b/manual/advanced_topics/viewports/grayscale-vp-syntax.tex @@ -1,6 +1,6 @@ \subsubsection{Viewport Declaration Syntax} -\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}}% +\config{\%V(x,y,[width],[height],[font]) \%Vf([fgshade]) \%Vb([bgshade])}% \begin{itemize} \item `fgshade' and `bgshade' are numbers in the range 0 (= black) to 3 @@ -12,15 +12,16 @@ definitions blank will set them to their default values. \end{itemize} -\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in +\note{The correct number of commas with hyphens in blank fields are still needed in any case.} \begin{example} - %V|12|20|-|-|1|-|-| + %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, as are the default foreground/background shades. + %sThe user font is used, the foreground colour is set to black and the + %sbackground is set to white. \end{example} \begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{} width/height & remaining part of screen \\ diff --git a/manual/advanced_topics/viewports/mono-conditional.tex b/manual/advanced_topics/viewports/mono-conditional.tex index 399832cc79..af6e6f6d2d 100644 --- a/manual/advanced_topics/viewports/mono-conditional.tex +++ b/manual/advanced_topics/viewports/mono-conditional.tex @@ -1,12 +1,12 @@ \begin{example} - %?mh<%Vda|%Vdb> - %Vl|a|10|10|50|50|-| + %?mh<%Vd(a)|%Vd(b)> + %Vl(a,10,10,50,50,-) %sYou could now show a hold icon using the %%xl and %%xd tags. - %Vl|a|0|70|70|14|1| + %Vl(a,0,70,70,14,1) %s%acYour DAP is locked. - %Vl|b|20|14|50|14|1| - %t1%acWarning:;%t.1 - %Vl|b|20|30|50|50|0| + %Vl(b,20,14,50,14,1) + %t(1)%acWarning:;%t(.1) + %Vl(b,20,30,50,50,0) %sYou've unlocked your player. \end{example} This example checks for hold. Viewport `a' will be displayed if it is on, diff --git a/manual/advanced_topics/viewports/mono-vp-syntax.tex b/manual/advanced_topics/viewports/mono-vp-syntax.tex index 8c84607499..81194a99d0 100644 --- a/manual/advanced_topics/viewports/mono-vp-syntax.tex +++ b/manual/advanced_topics/viewports/mono-vp-syntax.tex @@ -1,6 +1,6 @@ \subsubsection{Viewport Declaration Syntax} -\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}}% +\config{\%V(x,y,[width],[height],[font]}% \begin{itemize} \item `font' is a number: 0 is the built-in system font, 1 is the @@ -10,11 +10,11 @@ definitions blank will set them to their default values. \end{itemize} -\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in +\note{The correct number of commas with hyphens in blank fields are still needed in any case.} \begin{example} - %V|12|20|-|-|1| + %V(12,20,-,-,1) %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. diff --git a/manual/appendix/wps_tags.tex b/manual/appendix/wps_tags.tex index 0707d14b5c..22735f19f0 100644 --- a/manual/appendix/wps_tags.tex +++ b/manual/appendix/wps_tags.tex @@ -37,36 +37,33 @@ show the information for the next song to be played. \section{Viewports} \begin{tagmap} \nopt{lcd_non-mono}{% - \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}% - [height]{\textbar}[font]{\textbar}} + \config{\%V(x,y,[width],[height],[font])} & See section \ref{ref:Viewports}\\} \nopt{lcd_color}{\opt{lcd_non-mono}{% - \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}% - [height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}} + \config{\%V(x,y,[width],[height],[font]) \%Vf([fgshade]) \%Vb([bgshade])} & See section \ref{ref:Viewports}\\}} \opt{lcd_color}{% - \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}% - [height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}} + \config{\%V(x,y,[width],[height],[font])} + \config{\%Vf([fgcolour]) \%Vb([bgcolour])} & See section \ref{ref:Viewports}\\} - \config{\%Vd'identifier'} & Display the `identifier' viewport. E.g. - \config{\%?C{\textless}\%Vda{\textbar}\%Vdb{\textgreater}} + \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g. + \config{\%?C{\textless}\%Vd(a){\textbar}\%Vd(b){\textgreater}} will show viewport `a' if album art is found, and `b' if it isn't.\\ - \config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}} & + \config{\%Vi(`label',\dots)} & Declare a Custom UI Viewport. The `\dots' parameters use the same logic as the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\ - \config{\%VI'label'} & Set the Info Viewport to use the viewport called + \config{\%VI(`label')} & Set the Info Viewport to use the viewport called label, as declared with the previous tag.\\ \end{tagmap} \section{Additional Fonts} \begin{tagmap} - \config{\%F{\textbar}id{\textbar}filename{\textbar}} & - See section \ref{ref:multifont}.\\ + \config{\%Fl(`id',filename)} & See section \ref{ref:multifont}.\\ \end{tagmap} } @@ -79,6 +76,9 @@ show the information for the next song to be played. 2{\textbar}\ldots{\textbar}N{\textgreater}}, where the value $-1$ is used when the battery level isn't known (it usually is)\\ + & An image can also be used, the proportion of the image + shown correspinds to the battery level: + \config{\%bl(x,y,[width],[height],image.bmp)}\\ \config{\%bv} & The battery level in volts\\ \config{\%bt} & Estimated battery time left\\ \config{\%bp} & ``p'' if the charger is connected (only on targets @@ -110,16 +110,16 @@ show the information for the next song to be played. \config{\%fp} & File Path\\ \config{\%fs} & File Size (in Kilobytes)\\ \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\ - \config{\%d1} & First directory from the end of the file path\\ - \config{\%d2} & Second directory from the end of the file path\\ - \config{\%d3} & Third directory from the end of the file path\\ + \config{\%d(1)} & First directory from the end of the file path\\ + \config{\%d(2)} & Second directory from the end of the file path\\ + \config{\%d(3)} & Third directory from the end of the file path\\ \end{tagmap} -Example for the \config{\%dN} commands: If the path is -``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d1} is ``Isola'', -\config{\%d2} is ``Kent'' and \config{\%d3} is ``Rock''. +Example for the \config{\%d(N)} commands: If the path is +``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d(1)} is ``Isola'', +\config{\%d(2)} is ``Kent'' and \config{\%d(3)} is ``Rock''. -These tags, when written with the first letter capitalized (e.g. \config{\%Fn} or \config{\%D2}), -produce the information for the next file to be played. +These tags, when written with the first letter capitalized (e.g. \config{\%Fn} +or \config{\%D(2)}), produce the information for the next file to be played. \section{Playlist/Song Info} \begin{tagmap} @@ -131,7 +131,7 @@ produce the information for the next file to be played. & This will replace the entire line with a progress bar. \\ & You can set the position, width and height of the progressbar % (in pixels) and load a custom image for it: % - \config{\%pb{\textbar}x{\textbar}y{\textbar}width{\textbar}height{\textbar}image.bmp{\textbar}}} \\ + \config{\%pb(x,y,[width],[height],image.bmp)}} \\ \opt{player}{% \config{\%pf} & Full-line progress bar \& time display\\ }% @@ -152,16 +152,16 @@ produce the information for the next file to be played. {\textbar}N{\textgreater}}\\ & 0 is used for mute, the last option is used for values greater than zero.\\ \opt{lcd_bitmap}{& This can also be used like \%pb to provide a continuous scale: - \config{\%pv{{\textbar}x{\textbar}y{\textbar}width{\textbar}height\textbar}image.bmp{\textbar}}} \\ + \config{\%pv(x,y,[width],[height],image.bmp)}} \\ \config{\%pS} & Track is starting. An optional number gives how many seconds the tag remains true for after the start of the track. The default is 10 seconds if no number is specified.\\ - & \config{\%pS7{\textless}in the first 7 seconds of track{\textbar}in + & \config{\%pS(7){\textless}in the first 7 seconds of track{\textbar}in the rest of the track{\textgreater}}\\ \config{\%pE} & Track is ending. An optional number gives how many seconds before the end of the track the tag becomes true. The default is 10 seconds if no number is specified.\\ - & \config{\%pE7{\textless}in the last 7 seconds of track{\textbar}in + & \config{\%pE(7){\textless}in the last 7 seconds of track{\textbar}in the rest of the track{\textgreater}}\\ \config{\%Sp} & Current Playback Pitch\\ \end{tagmap} @@ -259,7 +259,7 @@ Recording screen{\textbar}FM Radio screen{\textgreater}} \section{Changing Volume} \begin{tagmap} - \config{\%mv[t]} & ``v'' if the volume is being changed\\ + \config{\%mv(t)} & ``v'' if the volume is being changed\\ \end{tagmap} The tag produces the letter ``v'' while the volume is being changed and some @@ -271,7 +271,7 @@ The tag can be used as the switch in a conditional tag to display different thin depending on whether the volume is being changed. It can produce neat effects when used with conditional viewports. -Example: \config{\%?mv2.5{\textless}Volume changing{\textbar}\%pv{\textgreater}} +Example: \config{\%?mv(2.5){\textless}Volume changing{\textbar}\%pv{\textgreater}} The example above will display the text ``Volume changing'' if the volume is being changed and 2.5 seconds after the volume button has been released. After @@ -279,15 +279,15 @@ that, it will display the volume value. \section{Settings} \begin{tagmap} - \config{\%St{\textbar}{\textbar}} & The value of the Rockbox + \config{\%St()} & The value of the Rockbox setting with the specified name. See \reference{ref:config_file_options} for the list of the available settings.\\ \end{tagmap} Examples: \begin{enumerate} -\item As a simple tag: \config{\%St{\textbar}skip length{\textbar}} -\item As a conditional: \config{\%?St{\textbar}eq enabled{\textbar}{\textless}Eq is enabled{\textbar}Eq is disabled{\textgreater}} +\item As a simple tag: \config{\%St(skip length)} +\item As a conditional: \config{\%?St(eq enabled){\textless}Eq is enabled{\textbar}Eq is disabled{\textgreater}} \end{enumerate} @@ -295,17 +295,17 @@ Examples: \section{\label{ref:wps_images}Images} \begin{tagmap} \nopt{archos}{% - \config{\%X{\textbar}filename.bmp{\textbar}} + \config{\%X(filename.bmp)} & Load and set a backdrop image for the WPS. This image must be exactly the same size as your LCD.\\ }% - \config{\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}} + \config{\%x(n,filename,x,y)} & Load and display an image\\ & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\ & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\ & \config{x}: x coordinate\\ & \config{y}: y coordinate.\\ - \config{\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}[nimages{\textbar}]} + \config{\%xl(n,filename,x,y,[nimages])} & Preload an image for later display (useful for when your images are displayed conditionally)\\ & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\ & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\ @@ -313,7 +313,7 @@ Examples: & \config{y}: y coordinate\\ & \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height) contained in the bitmap. Default is 1.\\ - \config{\%xdn[i]} & Display a preloaded image\\ + \config{\%xd(n[i])} & Display a preloaded image\\ & \config{n}: image ID (a-z and A-Z) as it was specified in \config{\%x} or \config{\%xl}\\ & \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52). By default the first (i.e. top most) sub-image will be used.\\ @@ -322,12 +322,12 @@ Examples: Examples: \begin{enumerate} \item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\ -\config{\%x{\textbar}a{\textbar}bg.bmp{\textbar}37{\textbar}109{\textbar}} +\config{\%x(a,bg.bmp,37,109)} \item Load a bitmap strip containing 5 volume icon images (all the same size) with image ID ``M'', and then reference the individual sub-images in a conditional:\\ -\config{\%xl{\textbar}M{\textbar}volume.bmp{\textbar}134{\textbar}153{\textbar}5{\textbar}}\\ -\config{\%?pv<\%xdMa{\textbar}\%xdMb{\textbar}\%xdMc{\textbar}\%xdMd{\textbar}% -\%xdMe>} +\config{\%xl(M,volume.bmp,134,153,5)}\\ +\config{\%?pv<\%xd(Ma){\textbar}\%xd(Mb){\textbar}\%xd(Mc){\textbar}% +\%xd(Md){\textbar}\%xd(Me)>} \end{enumerate} @@ -390,43 +390,32 @@ Once the album art files are present on your \dap, they can be displayed as follows. \begin{tagmap} - \config{\%Cl{\textbar}x{\textbar}y{\textbar}[[l{\textbar}c{\textbar}r]maxwidth]{\textbar}[[t{\textbar}c{\textbar}b]maxheight]{\textbar}} + \config{\%Cl(x,y,[maxwidth],[maxheight],hor\_align,vert\_align)} & Define the settings for albumart\\ & \config{x}: x coordinate\\ & \config{y}: y coordinate\\ & \config{maxwidth}: Maximum height\\ & \config{maxheight}: Maximum width\\ + & \config{hor\_align}: Horizontal alignment, enter as `l', `c' or `r' for + left, centre or right. Centre is default\\ + & \config{vert\_align}: Vertical alignment, enter as `t', `c' or `b' for + top, centre or bottom. Centre is default\\ \config{\%Cd} & Display the album art as configured. \\ - \config{\%C} & USe in a conditional to determine if an image is available. \\ + \config{\%C} & Use in a conditional to determine if an image is available. \\ \end{tagmap} The picture will be rescaled, preserving aspect ratio to fit the given \config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the -configured values, the picture will be placed according to the flags to the -\config{maxwidth} and \config{maxheight} parameters: -\begin{itemize} - \item \config{maxwidth}: - \begin{description} - \item[\config{l}.] Align left - \item[\config{c}.] Align centre (default) - \item[\config{r}.] Align right - \end{description} - \item \config{maxheight}: - \begin{description} - \item[\config{t}.] Align top - \item[\config{c}.] Align centre (default) - \item[\config{b}.] Align bottom - \end{description} -\end{itemize} +configured values, the picture will be placed according to the alignment flags. Examples: \begin{enumerate} \item Load albumart at position 20,40 and display it without resizing:\\ - \config{\%Cl{\textbar}20{\textbar}40{\textbar}{\textbar}{\textbar}} + \config{\%Cl(20,40,,)} \item Load albumart at position 0,20 and resize it to be at most 100$\times$100 pixels. If the image isn't square, align it to the bottom-right corner:\\ - \config{\%CL{\textbar}0{\textbar}20{\textbar}r100{\textbar}b100{\textbar}} + \config{\%Cl(0,20,100,100,r,b)} \end{enumerate} } @@ -484,8 +473,8 @@ order left -- centre -- right. If the aligned texts overlap, they are merged. \section{Subline Tags} \begin{tagmap} -\config{\%t{\textless}time{\textgreater}} - & Set the subline display cycle time (\%t5 or \%t3.4 formats) \\ +\config{\%t{\textless}(time){\textgreater}} + & Set the subline display cycle time (\%t(5) or \%t(3.4) formats) \\ \config{;} & Split items on a line into separate sublines \\ \end{tagmap} @@ -534,7 +523,7 @@ Example: \section{Text Translation} \begin{tagmap} - \config{\%Sx{\textbar}{\textless}English{\textgreater}{\textbar}} + \config{\%Sx(English)} & Display the translation of ``English'' in the current language\\ \end{tagmap} @@ -550,8 +539,7 @@ Example: \opt{touchscreen}{ \section{Touchscreen Areas (WPS only)} \begin{tagmap} - \config{\%T{\textbar}x{\textbar}y{\textbar}width{\textbar}height% - {\textbar}action{\textbar}} + \config{\%T(x,y,[width],[height],action)} & Invoke the action specified when the user presses in the defined touchscreen area.\\ \end{tagmap} @@ -585,7 +573,7 @@ Example: This tag can be used to display text or images or a viewport when the touchscreen is pressed (like an On Screen Display). If you put a number straight after \%Tl it will be used as a timeout in seconds - (e.g \%Tl2.5 will give a 2.5 second timeout) between the touchscreen press + (e.g \%Tl(2.5) will give a 2.5 second timeout) between the touchscreen press being released and the tag going false. If no number is specified it will use a 1 second timeout. It can also be used as a conditional, and can be used with conditional viewports. @@ -593,11 +581,15 @@ Example: \section{Other Tags} \begin{tagmap} + \config{\%(} & The character `('\\ + \config{\%)} & The character `)'\\ + \config{\%,} & The character `,'\\ \config{\%\%} & The character `\%'\\ \config{\%{\textless}} & The character `{\textless}'\\ \config{\%{\textbar}} & The character `{\textbar}'\\ \config{\%{\textgreater}} & The character `{\textgreater}'\\ \config{\%;} & The character `;'\\ + \config{\#} & The character `\#'\\ \config{\%s} & Indicate that the line should scroll. Can occur anywhere in a line (given that the text is displayed; see conditionals above). You can specify -- cgit v1.2.3