Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 1 | % $Id$ % |
Alex Parker | 40782d5 | 2010-05-13 08:13:31 +0000 | [diff] [blame] | 2 | \chapter{\label{ref:wps_tags}Theme Tags} |
| 3 | Themeing is discussed in detail in section \reference{ref:ConfiguringtheWPS}, |
| 4 | what follows is a list of the available tags. |
| 5 | |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 6 | \note{The ``bar-type tags'' (such as \%pb, \%pv, \%bl etc.) can be further |
| 7 | themed -- see \reference{ref:bar_tags}.} |
| 8 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 9 | \section{Status Bar} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 10 | \begin{tagmap} |
Alex Parker | 0c1f3e6 | 2010-03-21 10:20:19 +0000 | [diff] [blame] | 11 | \config{\%we} & Display Status Bar\\ |
| 12 | \config{\%wd} & Hide Status Bar\\ |
| 13 | \config{\%wi} & Display the inbuilt Status Bar in the current viewport\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 14 | \end{tagmap} |
| 15 | These tags override the player setting for the display of the status bar. |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 16 | They must be noted on their own line (which will not be shown in the WPS). |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 17 | |
Marianne Arnold | fa63211 | 2010-10-29 17:52:20 +0000 | [diff] [blame] | 18 | \section{Hardware Capabilities} |
| 19 | \begin{tagmap} |
| 20 | \config{\%cc} & Check for presence of a real time clock, returns ``c'' |
| 21 | when used unconditionally\\ |
| 22 | \config{\%tp} & Does this target have a radio?\\ |
| 23 | \config{\%Tp} & Indicates that the target has a touchscreen\\ |
| 24 | \end{tagmap} |
| 25 | With the above tags it is possible to find out about the presence of certain |
| 26 | hardware and make the theme adapt to it. This can be very useful for designing |
| 27 | a theme that works on multiple targets with differing hardware capabilities, e.g. |
| 28 | targets that do and do not have a clock. When used conditionally, the ``true'' |
| 29 | branch is completely ignored if it does not apply. |
| 30 | |
| 31 | Example: |
| 32 | \config{\%?cc<\%cH:\%cM|No clock detected>} |
| 33 | |
| 34 | |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 35 | \section{Information from the track tags} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 36 | \begin{tagmap} |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 37 | \config{\%ia} & Artist\\ |
| 38 | \config{\%ic} & Composer\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 39 | \config{\%iA} & Album Artist\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 40 | \config{\%id} & Album Name\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 41 | \config{\%iG} & Grouping\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 42 | \config{\%ig} & Genre Name\\ |
| 43 | \config{\%in} & Track Number\\ |
| 44 | \config{\%it} & Track Title\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 45 | \config{\%iC} & Comment\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 46 | \config{\%iv} & ID3 version (1.0, 1.1, 2.2, 2.3, 2.4, or empty if not an ID3 tag)\\ |
| 47 | \config{\%iy} & Year\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 48 | \config{\%ik} & Disc Number\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 49 | \end{tagmap} |
| 50 | Remember that this information is not always available, so use the |
| 51 | conditionals to show alternate information in preference to assuming. |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 52 | |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 53 | These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}), |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 54 | show the information for the next song to be played. |
| 55 | |
| 56 | \nopt{lcd_charcell}{ |
| 57 | \section{Viewports} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 58 | \begin{tagmap} |
| 59 | \nopt{lcd_non-mono}{% |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 60 | \config{\%V(x,y,[width],\tabnlindent[height],[font])} |
Alexander Levin | 6d4637c | 2010-03-27 15:52:27 +0000 | [diff] [blame] | 61 | & See section \ref{ref:Viewports}\\} |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 62 | |
| 63 | \nopt{lcd_color}{\opt{lcd_non-mono}{% |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 64 | \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline |
| 65 | \config{\%Vf([fgshade])}\newline |
| 66 | \config{\%Vb([bgshade])} |
Alexander Levin | 6d4637c | 2010-03-27 15:52:27 +0000 | [diff] [blame] | 67 | & See section \ref{ref:Viewports}\\}} |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 68 | |
| 69 | \opt{lcd_color}{% |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 70 | \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline |
| 71 | \config{\%Vf([fgcolour])}\newline |
Alex Parker | 77a78ee | 2011-08-19 11:43:51 +0000 | [diff] [blame] | 72 | \config{\%Vb([bgcolour])}\newline |
| 73 | \config{\%Vg(start,end \tabnlindent[,text])} |
Alexander Levin | 6d4637c | 2010-03-27 15:52:27 +0000 | [diff] [blame] | 74 | & See section \ref{ref:Viewports}\\} |
Alex Parker | 77a78ee | 2011-08-19 11:43:51 +0000 | [diff] [blame] | 75 | |
| 76 | \opt{lcd_non-mono}{% |
| 77 | \config{\%Vs(mode[,param])} |
| 78 | & See section \ref{ref:Viewports}\\} |
| 79 | |
Alex Parker | ecb2111 | 2010-08-02 21:21:33 +0000 | [diff] [blame] | 80 | \config{\%Vl('identifier',\newline\dots)} & Preloads a viewport for later |
| 81 | display. `identifier' is a single lowercase letter (a-z) and the `\dots' |
| 82 | parameters use the same logic as the \%V tag explained above.\\ |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 83 | |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 84 | \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g. |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 85 | \config{\%?C<\%Vd(a)|\%Vd(b)>} |
Alexander Levin | ac00d26 | 2010-03-26 22:12:39 +0000 | [diff] [blame] | 86 | will show viewport `a' if album art is found, and `b' if it isn't.\\ |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 87 | |
Alex Parker | 49f2fce | 2010-06-20 16:27:41 +0000 | [diff] [blame] | 88 | \config{\%Vi('label',\dots)} & |
Alexander Levin | 9f95a0b | 2010-05-13 08:41:01 +0000 | [diff] [blame] | 89 | Declare a Custom UI Viewport. The `\dots' parameters use the same logic as |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 90 | the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\ |
| 91 | |
Alex Parker | 49f2fce | 2010-06-20 16:27:41 +0000 | [diff] [blame] | 92 | \config{\%VI('label')} & Set the Info Viewport to use the viewport called |
Alex Parker | 6d549df | 2010-05-13 08:13:37 +0000 | [diff] [blame] | 93 | label, as declared with the previous tag.\\ |
Jonathan Gordon | 2c71aa9 | 2012-02-28 22:26:32 +1100 | [diff] [blame] | 94 | |
Alexander Levin | 5db58fc | 2012-03-02 19:58:45 +0100 | [diff] [blame] | 95 | \config{\%VB} & Draw this viewport on the backdrop layer.\\ |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 96 | \end{tagmap} |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 97 | |
| 98 | \section{Additional Fonts} |
| 99 | \begin{tagmap} |
Alex Parker | 49f2fce | 2010-06-20 16:27:41 +0000 | [diff] [blame] | 100 | \config{\%Fl('id',filename)} & See section \ref{ref:multifont}.\\ |
Alex Parker | 1b0c77f | 2010-06-20 12:58:09 +0000 | [diff] [blame] | 101 | \end{tagmap} |
| 102 | |
Jonathan Gordon | 014a08c | 2012-03-15 22:50:17 +1100 | [diff] [blame] | 103 | \section{Misc Coloring Tags} |
| 104 | \begin{tagmap} |
| 105 | \config{\%dr(x,y,width,height,[color1,color2])} & Color a rectangle. \\ |
| 106 | \end{tagmap} |
| 107 | width and height can be - to fill the viewport. If no color is |
| 108 | specified the viewports foreground color will be used. If two |
| 109 | colors are specified it will do a gradient fill. |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 110 | } |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 111 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 112 | \section{Power Related Information} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 113 | \begin{tagmap} |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 114 | \config{\%bl} & Numeric battery level in percents. |
| 115 | Can also be used in a conditional: |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 116 | \config{\%?bl<-1|0|1|2|\ldots|N>}, |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 117 | where the value $-1$ is used when the battery level isn't |
Magnus Holmgren | 0b92158 | 2010-08-12 09:50:29 +0000 | [diff] [blame] | 118 | known (it usually is). The value $N$ is only used when the |
| 119 | battery level is exactly 100 percent. |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 120 | An image can also be used, the proportion of the image |
Magnus Holmgren | 0b92158 | 2010-08-12 09:50:29 +0000 | [diff] [blame] | 121 | shown corresponds to the battery level: |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 122 | \config{\%bl(x,y,[width],[height],image.bmp)}\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 123 | \config{\%bv} & The battery level in volts\\ |
| 124 | \config{\%bt} & Estimated battery time left\\ |
| 125 | \config{\%bp} & ``p'' if the charger is connected (only on targets |
| 126 | that can charge batteries)\\ |
| 127 | \config{\%bc} & ``c'' if the unit is currently charging the battery (only on |
| 128 | targets that have software charge control or monitoring)\\ |
| 129 | \config{\%bs} & Remaining time of the sleep timer (if it is set)\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 130 | \end{tagmap} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 131 | |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 132 | \section{Information about the file} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 133 | \begin{tagmap} |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 134 | \config{\%fb} & File Bitrate (in kbps)\\ |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 135 | \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC''). |
| 136 | This tag can also be used in a conditional tag: |
| 137 | \config{\%?fc<mp1|mp2|mp3|aiff|wav|ogg|\newline |
Andree Buschmann | a884ec2 | 2011-11-28 18:45:33 +0000 | [diff] [blame] | 138 | flac|mpcsv7|a52|wavpack|alac|aac|shn|sid|adx|nsf|\newline |
| 139 | speex|spc|ape|wma|wmpapro|mod|sap|realaudiocook|\newline |
| 140 | realaudioaac|realaudioac3|realaudioatrac3|cmc|\newline |
| 141 | cm3|cmr|cms|dmc|dlt|mpt|mpd|rmt|tmc|tm8|tm2|\newline |
| 142 | omaatrac3|smaf|au|vox|wave64|tta|wmavoice|mpcsv8|\newline |
| 143 | aache|ay|gbs|hes|sgc|vgm|kss|unknown>}. |
| 144 | The codec order is as shown above.\\ |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 145 | \config{\%ff} & File Frequency (in Hz)\\ |
Andree Buschmann | 53cf63f | 2010-04-14 19:44:07 +0000 | [diff] [blame] | 146 | \config{\%fk} & File Frequency (in kHz)\\ |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 147 | \config{\%fm} & File Name\\ |
| 148 | \config{\%fn} & File Name (without extension)\\ |
| 149 | \config{\%fp} & File Path\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 150 | \config{\%fs} & File Size (in Kilobytes)\\ |
| 151 | \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\ |
Alexander Levin | a43fbbb | 2010-07-01 18:55:43 +0000 | [diff] [blame] | 152 | \config{\%d(N)} & N-th segment from the end of the file's directory |
| 153 | (N can be 1, 2, 3, \dots)\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 154 | \end{tagmap} |
Alexander Levin | a43fbbb | 2010-07-01 18:55:43 +0000 | [diff] [blame] | 155 | Example for the \config{\%d(N)} commands: If the file is |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 156 | ``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d(1)} is ``Isola'', |
| 157 | \config{\%d(2)} is ``Kent'' and \config{\%d(3)} is ``Rock''. |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 158 | |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 159 | These tags, when written with the first letter capitalized (e.g. \config{\%Fn} |
| 160 | or \config{\%D(2)}), produce the information for the next file to be played. |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 161 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 162 | \section{Playlist/Song Info} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 163 | \begin{tagmap} |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 164 | \config{\%pb} & Progress Bar. |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 165 | \opt{player}{ |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 166 | This will display a one character ``cup'' |
Martin Arver | ec60a05 | 2006-03-29 18:40:42 +0000 | [diff] [blame] | 167 | that empties as the time progresses.} |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 168 | \opt{lcd_bitmap}{ |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 169 | This will replace the entire line with a progress bar. |
| 170 | You can set the position, width and height of the progressbar |
| 171 | (in pixels) and load a custom image for it: |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 172 | \config{\%pb(x,y,[width],[height],image.bmp)}} \\ |
Dominik Riebeling | eef9694 | 2007-04-07 22:48:11 +0000 | [diff] [blame] | 173 | \opt{player}{% |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 174 | \config{\%pf} & Full-line progress bar \& time display\\ |
Dominik Riebeling | eef9694 | 2007-04-07 22:48:11 +0000 | [diff] [blame] | 175 | }% |
Alexander Levin | d8f5f51 | 2010-07-02 18:57:57 +0000 | [diff] [blame] | 176 | \config{\%px} & Percentage played in song\\ |
| 177 | \config{\%pc} & Current time in song\\ |
| 178 | \config{\%pe} & Total number of playlist entries\\ |
Dominik Riebeling | eef9694 | 2007-04-07 22:48:11 +0000 | [diff] [blame] | 179 | \nopt{player}{% |
| 180 | \config{\%pm} & Peak Meter. The entire line is used as % |
| 181 | volume peak meter.\\% |
Alex Parker | c16deb3 | 2011-01-13 18:09:46 +0000 | [diff] [blame] | 182 | \config{\%pL} & Peak meter for the left channel. Can be used as a value, % |
| 183 | a conditional tag or a bar tag.\\ |
| 184 | \config{\%pR} & Peak meter for the right channel. Can be used as a value, % |
| 185 | a conditional tag or a bar tag.\\ |
Dominik Riebeling | eef9694 | 2007-04-07 22:48:11 +0000 | [diff] [blame] | 186 | }% |
Alexander Levin | d8f5f51 | 2010-07-02 18:57:57 +0000 | [diff] [blame] | 187 | \config{\%pn} & Playlist name (without path or extension)\\ |
| 188 | \config{\%pp} & Playlist position\\ |
| 189 | \config{\%pr} & Remaining time in song\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 190 | \config{\%ps} & ``s'' if shuffle mode is enabled\\ |
Alexander Levin | d8f5f51 | 2010-07-02 18:57:57 +0000 | [diff] [blame] | 191 | \config{\%pt} & Total track time\\ |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 192 | \config{\%pv} & Current volume (in dB). Can also be used in a conditional: |
Alex Mayer | 659e599 | 2012-12-04 01:10:59 -0500 | [diff] [blame] | 193 | \config{\%?pv<Mute|\ldots|0 dB|Above 0 dB>}\newline |
| 194 | Mute is 0\% volume, \ldots is the values between Mute and max, 0 dB is max volume, and Above 0 dB is amplified volume |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 195 | \opt{lcd_bitmap}{This can also be used like \%pb to provide a continuous scale: |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 196 | \config{\%pv(x,y,[width],[height],image.bmp)}} \\ |
Alex Parker | bbb2dd5 | 2010-03-21 10:20:09 +0000 | [diff] [blame] | 197 | \config{\%pS} & Track is starting. An optional number gives how many seconds |
| 198 | the tag remains true for after the start of the track. The default is |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 199 | 10 seconds if no number is specified. |
Alexander Levin | 11e792b | 2010-09-24 19:07:42 +0000 | [diff] [blame] | 200 | \config{\%?pS(7)<in the first 7 seconds of track|in |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 201 | the rest of the track>}\\ |
Alex Parker | bbb2dd5 | 2010-03-21 10:20:09 +0000 | [diff] [blame] | 202 | \config{\%pE} & Track is ending. An optional number gives how many seconds |
Alex Parker | 7e84cca | 2010-03-22 20:41:14 +0000 | [diff] [blame] | 203 | before the end of the track the tag becomes true. The default is |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 204 | 10 seconds if no number is specified. |
Alexander Levin | 11e792b | 2010-09-24 19:07:42 +0000 | [diff] [blame] | 205 | \config{\%?pE(7)<in the last 7 seconds of track|in |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 206 | the rest of the track>}\\ |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 207 | \config{\%Sp} & Current playback pitch\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 208 | \end{tagmap} |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 209 | |
| 210 | \section{Playlist Viewer} |
| 211 | \begin{tagmap} |
Jonathan Gordon | d23d7a1 | 2010-08-14 15:27:46 +0000 | [diff] [blame] | 212 | \config{\%Vp(start,code to render)} & Display the playlist viewer in |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 213 | the current viewport.\\ |
| 214 | \end{tagmap} |
| 215 | |
| 216 | \begin{itemize} |
| 217 | \item `start' is the offset relative to the currently playing track for the |
| 218 | playlist to display from (0 the current track, 1 is the next track, etc.). |
Jonathan Gordon | d23d7a1 | 2010-08-14 15:27:46 +0000 | [diff] [blame] | 219 | \item `code to render' is a line of skin code which will be displayed for |
Alex Parker | 964a5e6 | 2011-08-09 14:39:32 +0000 | [diff] [blame] | 220 | each line in the viewer. All text tags are supported (including conditionals |
Jonathan Gordon | d23d7a1 | 2010-08-14 15:27:46 +0000 | [diff] [blame] | 221 | and sublines) |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 222 | \end{itemize} |
| 223 | |
| 224 | The entire viewport will be used, so don't expect other tags in the same |
| 225 | viewport to work well. Supported tags are \%pp, all tags starting with \%i, |
| 226 | most tags starting with \%f, \%pt and \%s.\\ |
| 227 | |
| 228 | Example: \config{\%Vp(1,\%pp - \%it,\%pp - \%fn)} -- Display the playlist |
| 229 | position, then either the track title (from the tags) or |
| 230 | the filename. The viewer will display as many tracks as will fit in the |
| 231 | viewport. |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 232 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 233 | \section{Runtime Database} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 234 | \begin{tagmap} |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 235 | \config{\%rp} & Song playcount\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 236 | \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag: % |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 237 | \config{\%?rr<0|1|2|3|4|5|6|7|8|9|10>}\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 238 | \config{\%ra} & Autoscore for the song\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 239 | \end{tagmap} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 240 | |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 241 | \opt{swcodec}{ |
Dominik Riebeling | 9eaa568 | 2006-04-10 17:35:49 +0000 | [diff] [blame] | 242 | \section{Sound (DSP) settings} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 243 | \begin{tagmap} |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 244 | \config{\%Sp} & Current playback pitch \\ |
Nils Wallménius | 12eb058 | 2008-03-23 22:07:09 +0000 | [diff] [blame] | 245 | \opt{swcodec}{ |
Jeffrey Goode | 0212de4 | 2009-11-11 17:38:00 +0000 | [diff] [blame] | 246 | \config{\%xf} & Crossfade setting, in the order: Off, Auto Skip, Man Skip, |
| 247 | Shuffle, Shuffle and Man Skip, Always\\ |
Andree Buschmann | 1248e9c | 2010-04-14 20:38:21 +0000 | [diff] [blame] | 248 | \config{\%rg} & ReplayGain value in use (x.y~dB). If used as a conditional, |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 249 | Replaygain type in use: \config{\%?rg<Off|Track% |
| 250 | |Album|TrackShuffle|AlbumShuffle% |
| 251 | |No tag>}\\ |
Dominik Riebeling | da1e28c | 2006-08-03 18:32:41 +0000 | [diff] [blame] | 252 | } |
Dominik Riebeling | 9eaa568 | 2006-04-10 17:35:49 +0000 | [diff] [blame] | 253 | \end{tagmap} |
| 254 | } |
Nils Wallménius | af68987 | 2009-08-24 15:19:14 +0000 | [diff] [blame] | 255 | |
Marianne Arnold | b013fb7 | 2010-07-01 21:02:12 +0000 | [diff] [blame] | 256 | \section{Hold} |
| 257 | \begin{tagmap} |
| 258 | \config{\%mh} & ``h'' if the main unit keys are locked\\ |
| 259 | \opt{remote_button_hold}{% |
| 260 | \config{\%mr} & ``r'' if the remote keys are locked\\ |
| 261 | } |
| 262 | \end{tagmap} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 263 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 264 | \section{Virtual LED} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 265 | \begin{tagmap} |
Marianne Arnold | a352c62 | 2007-05-19 19:03:39 +0000 | [diff] [blame] | 266 | \config{\%lh} & ``h'' if the \disk\ is accessed\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 267 | \end{tagmap} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 268 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 269 | \section{Repeat Mode} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 270 | \begin{tagmap} |
Marianne Arnold | c9532a2 | 2010-04-04 13:58:52 +0000 | [diff] [blame] | 271 | \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 272 | \end{tagmap} |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 273 | Example: \config{\%?mm<Off|All|One|Shuffle|A-B>} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 274 | |
Alexander Levin | 0bfef1c | 2010-02-26 19:57:51 +0000 | [diff] [blame] | 275 | \section{Playback Mode} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 276 | \begin{tagmap} |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 277 | \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause, |
Frank Gevaerts | 629bf3e | 2010-04-11 11:44:18 +0000 | [diff] [blame] | 278 | Fast Forward, Rewind, Recording, Recording paused, FM Radio playing, |
| 279 | FM Radio muted\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 280 | \end{tagmap} |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 281 | Example: \config{\%?mp<Stop|Play|Pause|Ffwd|Rew|Rec|Rec pause|FM|FM pause>} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 282 | |
Alexander Levin | 5ff8a5a | 2010-02-26 19:53:06 +0000 | [diff] [blame] | 283 | \section{Current Screen} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 284 | \begin{tagmap} |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 285 | \config{\%cs} & The current screen, 1-20, in the order shown below\\ |
Alexander Levin | 5ff8a5a | 2010-02-26 19:53:06 +0000 | [diff] [blame] | 286 | \end{tagmap} |
Alexander Levin | 5ff8a5a | 2010-02-26 19:53:06 +0000 | [diff] [blame] | 287 | |
Alex Parker | 6013614 | 2011-08-09 13:53:26 +0000 | [diff] [blame] | 288 | \begin{table} |
| 289 | \begin{rbtabular}{.75\textwidth}{lX}% |
| 290 | {\textbf{Number} & \textbf{Screen}}{}{} |
| 291 | 1 & Menus \\ |
| 292 | 2 & WPS \\ |
| 293 | 3 & Recording screen \\ |
| 294 | 4 & FM Radio screen \\ |
| 295 | 5 & Current Playlist screen \\ |
| 296 | 6 & Settings menus \\ |
| 297 | 7 & File browser \\ |
| 298 | 8 & Database browser \\ |
| 299 | 9 & Plugin browser \\ |
| 300 | 10 & Quickscreen \\ |
| 301 | 11 & Pitchscreen \\ |
| 302 | 12 & Setting chooser \\ |
| 303 | 13 & Playlist Catalogue Viewer \\ |
| 304 | 14 & Plugin \\ |
| 305 | 15 & Context menu \\ |
| 306 | 16 & System Info screen \\ |
| 307 | 17 & Time and Date Screen \\ |
| 308 | 18 & Bookmark browser \\ |
Jonathan Gordon | 0402a5c | 2011-12-19 08:54:01 +0000 | [diff] [blame] | 309 | 19 & Shortcuts menu \\ |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 310 | 20 & Track Info screen \\ |
Alex Parker | 6013614 | 2011-08-09 13:53:26 +0000 | [diff] [blame] | 311 | \end{rbtabular} |
| 312 | \end{table} |
| 313 | |
| 314 | The tag can also be used as the switch in a conditional tag. For players without |
| 315 | certain capabilities (e.g. no FM radio) some values will never be returned. |
| 316 | |
| 317 | Examples: |
| 318 | |
| 319 | \config{You are in the \%?cs<Main menu|WPS|Recording screen|FM Radio screen>} |
| 320 | |
| 321 | \config{\%?if(\%cs, =, 2)<This is the WPS>} |
Alexander Levin | 5ff8a5a | 2010-02-26 19:53:06 +0000 | [diff] [blame] | 322 | |
Alex Parker | 165709b | 2010-03-21 10:20:24 +0000 | [diff] [blame] | 323 | \section{List Title (\fname{.sbs} only)} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 324 | \begin{tagmap} |
Alex Parker | 165709b | 2010-03-21 10:20:24 +0000 | [diff] [blame] | 325 | \config{\%Lt} & Title text. Should be used in a conditional so that non-list |
| 326 | screens don't show a title when they shouldn't\\ |
| 327 | \config{\%Li} & Title icon. This uses the same order as custom icons (see |
| 328 | \wikilink{CustomIcons} in the wiki) except that here \config{0} is ``no |
| 329 | icon''\\ |
| 330 | \end{tagmap} |
| 331 | |
| 332 | This tag can be used to give custom formatting to list titles. |
| 333 | Define a viewport with the font and formatting desired, and then use |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 334 | \config{\%?Lt<\%Lt>} to display the title within the |
Alex Parker | 165709b | 2010-03-21 10:20:24 +0000 | [diff] [blame] | 335 | viewport. If \config{\%Lt} is present anywhere in the \fname{.sbs}, then the |
| 336 | \config{\%Vi} viewport will not show the title. |
| 337 | |
Dominik Riebeling | 71c1e2a | 2008-10-12 10:48:06 +0000 | [diff] [blame] | 338 | \section{Changing Volume} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 339 | \begin{tagmap} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 340 | \config{\%mv(t)} & ``v'' if the volume is being changed\\ |
Dominik Riebeling | 71c1e2a | 2008-10-12 10:48:06 +0000 | [diff] [blame] | 341 | \end{tagmap} |
Dominik Riebeling | 71c1e2a | 2008-10-12 10:48:06 +0000 | [diff] [blame] | 342 | |
| 343 | The tag produces the letter ``v'' while the volume is being changed and some |
| 344 | amount of time after that, i.e. after the volume button has been released. The |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 345 | optional parameter \config{t} specifies that amount of time, in seconds. If it |
| 346 | is not specified, 1 second is assumed. |
Dominik Riebeling | 71c1e2a | 2008-10-12 10:48:06 +0000 | [diff] [blame] | 347 | |
| 348 | The tag can be used as the switch in a conditional tag to display different things |
| 349 | depending on whether the volume is being changed. It can produce neat effects |
| 350 | when used with conditional viewports. |
| 351 | |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 352 | Example: \config{\%?mv(2.5)<Volume changing|\%pv>} |
Dominik Riebeling | 71c1e2a | 2008-10-12 10:48:06 +0000 | [diff] [blame] | 353 | |
| 354 | The example above will display the text ``Volume changing'' if the volume is |
Andree Buschmann | 1248e9c | 2010-04-14 20:38:21 +0000 | [diff] [blame] | 355 | being changed and 2.5 seconds after the volume button has been released. After |
Dominik Riebeling | 71c1e2a | 2008-10-12 10:48:06 +0000 | [diff] [blame] | 356 | that, it will display the volume value. |
| 357 | |
Antoine Cellerier | 8289b96 | 2008-12-07 16:20:35 +0000 | [diff] [blame] | 358 | \section{Settings} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 359 | \begin{tagmap} |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 360 | \config{\%St(<setting\tabnlindent{}name>)} & The value of the Rockbox |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 361 | setting with the specified name. See \reference{ref:config_file_options} |
| 362 | for the list of the available settings.\\ |
Jonathan Gordon | 65f9df3 | 2012-07-05 22:44:13 +1000 | [diff] [blame] | 363 | \config{\%St(...)} & Draw a bar using from the setting. |
| 364 | See \reference{ref:bar_tags} for details.\\ |
Antoine Cellerier | 8289b96 | 2008-12-07 16:20:35 +0000 | [diff] [blame] | 365 | \end{tagmap} |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 366 | |
| 367 | Examples: |
| 368 | \begin{enumerate} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 369 | \item As a simple tag: \config{\%St(skip length)} |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 370 | \item As a conditional: \config{\%?St(eq enabled)<Eq is enabled|Eq is disabled>} |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 371 | \end{enumerate} |
| 372 | |
Antoine Cellerier | 8289b96 | 2008-12-07 16:20:35 +0000 | [diff] [blame] | 373 | |
Jonas Häggqvist | 410cbd1 | 2009-02-20 18:37:57 +0000 | [diff] [blame] | 374 | \opt{lcd_bitmap}{ |
Alex Parker | ab563da | 2009-09-20 16:48:45 +0000 | [diff] [blame] | 375 | \section{\label{ref:wps_images}Images} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 376 | \begin{tagmap} |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 377 | \nopt{archos}{% |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 378 | \config{\%X(filename.bmp)} |
Dominik Riebeling | 2ce440d | 2008-03-26 19:35:39 +0000 | [diff] [blame] | 379 | & Load and set a backdrop image for the WPS. |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 380 | This image must be exactly the same size as your LCD.\\ |
Nils Wallménius | da55588 | 2006-11-13 15:14:28 +0000 | [diff] [blame] | 381 | }% |
Jonathan Gordon | 1c1e1c0 | 2012-02-29 00:07:16 +1100 | [diff] [blame] | 382 | \config{\%x(n,filename[,x,y])} |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 383 | & Load and display an image\newline |
Jonathan Gordon | 406a363 | 2012-12-09 17:15:17 +1100 | [diff] [blame] | 384 | \config{n}: image ID for later referencing in \config{\%xd}\newline |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 385 | \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline |
Jonathan Gordon | 1c1e1c0 | 2012-02-29 00:07:16 +1100 | [diff] [blame] | 386 | \config{x}: x coordinate (defaults to 0 if both x and y are not specified)\newline |
| 387 | \config{y}: y coordinate. (defaults to 0 if both x and y are not specified)\\ |
| 388 | \config{\%xl(n,filename,[x,y],\tabnlindent[nimages])} |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 389 | & Preload an image for later display (useful for when your images are displayed conditionally).\newline |
Jonathan Gordon | 406a363 | 2012-12-09 17:15:17 +1100 | [diff] [blame] | 390 | \config{n}: image ID for later referencing in \config{\%xd}\newline |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 391 | \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline |
Marianne Arnold | f67dfd9 | 2010-08-13 21:36:44 +0000 | [diff] [blame] | 392 | If the filename is ``\_\_list\_icons\_\_'' the list icon bitmap will be used instead\newline |
Jonathan Gordon | 1c1e1c0 | 2012-02-29 00:07:16 +1100 | [diff] [blame] | 393 | \config{x}: x coordinate (defaults to 0 if both x and y are not specified)\newline |
pixelma | 4601a8b | 2012-03-02 21:46:53 +0100 | [diff] [blame] | 394 | \config{y}: y coordinate. (defaults to 0 if both x and y are not specified)\newline |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 395 | \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height) |
Dominik Riebeling | 2ce440d | 2008-03-26 19:35:39 +0000 | [diff] [blame] | 396 | contained in the bitmap. Default is 1.\\ |
Jonathan Gordon | 3f8e7fc | 2010-08-05 11:28:48 +0000 | [diff] [blame] | 397 | \config{\%xd(n[i] [,tag] [,offset])} & Display a preloaded image. |
Jonathan Gordon | 406a363 | 2012-12-09 17:15:17 +1100 | [diff] [blame] | 398 | \config{n}: image ID as it was specified in \config{\%x} or \config{\%xl}\newline |
Jonathan Gordon | 3f8e7fc | 2010-08-05 11:28:48 +0000 | [diff] [blame] | 399 | \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52). |
Jonathan Gordon | 406a363 | 2012-12-09 17:15:17 +1100 | [diff] [blame] | 400 | (ignored when \config{tag} is used). Only useable if the ID is a single letter. |
Jonathan Gordon | 3f8e7fc | 2010-08-05 11:28:48 +0000 | [diff] [blame] | 401 | By default the first (i.e. top most) sub-image will be used.\newline |
| 402 | \config{tag}: (optional) Another tag to calculate the subimage from e.g \config{\%xd(A, \%mh)} would |
| 403 | use the first subimage when \config{\%mh} is on and the second when it is off\newline |
Marianne Arnold | e6cb22e | 2010-08-07 08:27:24 +0000 | [diff] [blame] | 404 | \config{offset}: (optional) Add this number to the value from the \config{tag} when |
Jonathan Gordon | 3f8e7fc | 2010-08-05 11:28:48 +0000 | [diff] [blame] | 405 | chosing the subimage (may be negative)\\ |
Jonathan Gordon | 685cf59 | 2012-12-03 20:43:58 +1100 | [diff] [blame] | 406 | \config{\%x9(n)} |
| 407 | & Display an image as a 9-patch bitmap covering the entire viewport.\newline |
| 408 | 9-patch images are bitmaps split into 9 segments where the four corners |
| 409 | are unscaled, the four middle sections are scaled along one axis and the middle |
| 410 | section is scaled on both axis.\newline |
| 411 | \config{n}: image ID\\ |
| 412 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 413 | \end{tagmap} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 414 | |
Dominik Riebeling | 8f44dd2 | 2008-03-28 21:49:41 +0000 | [diff] [blame] | 415 | Examples: |
| 416 | \begin{enumerate} |
| 417 | \item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\ |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 418 | \config{\%x(a,bg.bmp,37,109)} |
Dominik Riebeling | 8f44dd2 | 2008-03-28 21:49:41 +0000 | [diff] [blame] | 419 | \item Load a bitmap strip containing 5 volume icon images (all the same size) |
| 420 | with image ID ``M'', and then reference the individual sub-images in a conditional:\\ |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 421 | \config{\%xl(M,volume.bmp,134,153,5)}\\ |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 422 | \config{\%?pv<\%xd(Ma)|\%xd(Mb)|\%xd(Mc)|% |
| 423 | \%xd(Md)|\%xd(Me)>} |
Dominik Riebeling | 8f44dd2 | 2008-03-28 21:49:41 +0000 | [diff] [blame] | 424 | \end{enumerate} |
Dominik Riebeling | 2ce440d | 2008-03-26 19:35:39 +0000 | [diff] [blame] | 425 | |
| 426 | |
Dominik Riebeling | 18f319c | 2006-04-01 17:00:04 +0000 | [diff] [blame] | 427 | \note{ |
| 428 | \begin{itemize} |
Alexander Levin | 3adb821 | 2009-03-24 21:39:48 +0000 | [diff] [blame] | 429 | \item The images must be in BMP format |
Dominik Riebeling | 18f319c | 2006-04-01 17:00:04 +0000 | [diff] [blame] | 430 | \item The image tag must be on its own line |
Jonathan Gordon | 406a363 | 2012-12-09 17:15:17 +1100 | [diff] [blame] | 431 | \item The ID is case sensitive |
Marianne Arnold | c4bdf20 | 2010-08-14 10:30:42 +0000 | [diff] [blame] | 432 | \item The size of the LCD screen for each \dap{} varies. See table below |
Dominik Riebeling | 18f319c | 2006-04-01 17:00:04 +0000 | [diff] [blame] | 433 | for appropriate sizes of each device. The x and y coordinates must |
Marianne Arnold | c4bdf20 | 2010-08-14 10:30:42 +0000 | [diff] [blame] | 434 | respect each of the \daps{} limits. |
Dominik Riebeling | 18f319c | 2006-04-01 17:00:04 +0000 | [diff] [blame] | 435 | \end{itemize} |
| 436 | } |
Jonas Häggqvist | 410cbd1 | 2009-02-20 18:37:57 +0000 | [diff] [blame] | 437 | } |
| 438 | |
| 439 | \opt{albumart}{ |
Alex Parker | 018133e | 2010-05-29 19:02:25 +0000 | [diff] [blame] | 440 | \subsection{How to display the album art} |
| 441 | |
| 442 | Once the album art files are present on your \dap, they can be displayed as |
| 443 | follows. |
| 444 | |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 445 | \begin{tagmap} |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 446 | \config{\%Cl(x,y,[maxwidth],\tabnlindent[maxheight],\tabnlindent{}hor\_align,\tabnlindent{}vert\_align)} |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 447 | & Define the settings for album art\newline |
| 448 | \config{x}: x coordinate\newline |
| 449 | \config{y}: y coordinate\newline |
| 450 | \config{maxwidth}: Maximum height\newline |
| 451 | \config{maxheight}: Maximum width\newline |
| 452 | \config{hor\_align}: Horizontal alignment, enter as `l', `c' or `r' for |
| 453 | left, centre or right. Centre is default\newline |
| 454 | \config{vert\_align}: Vertical alignment, enter as `t', `c' or `b' for |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 455 | top, centre or bottom. Centre is default\\ |
Jonathan Gordon | 50356d8 | 2010-06-08 15:09:32 +0000 | [diff] [blame] | 456 | \config{\%Cd} & Display the album art as configured. \\ |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 457 | \config{\%C} & Use in a conditional to determine if an image is available. \\ |
Jonas Häggqvist | 410cbd1 | 2009-02-20 18:37:57 +0000 | [diff] [blame] | 458 | \end{tagmap} |
Jonas Häggqvist | 410cbd1 | 2009-02-20 18:37:57 +0000 | [diff] [blame] | 459 | |
| 460 | The picture will be rescaled, preserving aspect ratio to fit the given |
| 461 | \config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 462 | configured values, the picture will be placed according to the alignment flags. |
Jonas Häggqvist | 0021534 | 2009-02-20 19:08:18 +0000 | [diff] [blame] | 463 | |
| 464 | Examples: |
| 465 | \begin{enumerate} |
| 466 | \item Load albumart at position 20,40 and display it without resizing:\\ |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 467 | \config{\%Cl(20,40,,)} |
Alexander Levin | 87b2ad14 | 2010-05-20 16:20:58 +0000 | [diff] [blame] | 468 | \item Load albumart at position 0,20 and resize it to be at most 100$\times$100 |
Jonas Häggqvist | 0021534 | 2009-02-20 19:08:18 +0000 | [diff] [blame] | 469 | pixels. If the image isn't square, align it to the bottom-right |
| 470 | corner:\\ |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 471 | \config{\%Cl(0,20,100,100,r,b)} |
Jonas Häggqvist | 0021534 | 2009-02-20 19:08:18 +0000 | [diff] [blame] | 472 | \end{enumerate} |
Marianne Arnold | cf90958 | 2012-05-19 17:41:11 +0200 | [diff] [blame] | 473 | |
| 474 | For general information where to put album art see \reference{ref:album_art}. |
Jonas Häggqvist | 410cbd1 | 2009-02-20 18:37:57 +0000 | [diff] [blame] | 475 | } |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 476 | |
Alex Parker | caa68b5 | 2010-05-29 19:02:19 +0000 | [diff] [blame] | 477 | \opt{radio}{ |
Alex Parker | 0926e3e | 2010-05-13 08:13:42 +0000 | [diff] [blame] | 478 | \section{FM Radio} |
| 479 | \begin{tagmap} |
Alex Parker | 0926e3e | 2010-05-13 08:13:42 +0000 | [diff] [blame] | 480 | \config{\%tt} & Is the tuner tuned?\\ |
Alexander Levin | 1940a0b | 2010-05-13 08:45:22 +0000 | [diff] [blame] | 481 | \config{\%tm} & Scan or preset mode? Scan is ``true'', preset is ``false''.\\ |
Alex Parker | 0926e3e | 2010-05-13 08:13:42 +0000 | [diff] [blame] | 482 | \config{\%ts} & Is the station in stereo?\\ |
Alexander Levin | edb6bed | 2010-05-15 21:47:30 +0000 | [diff] [blame] | 483 | \config{\%ta} & Minimum frequency (region specific) in MHz.\\ |
| 484 | \config{\%tb} & Maximum frequency (region specific) in MHz.\\ |
| 485 | \config{\%tf} & Current frequency in MHz.\\ |
Alex Parker | 0926e3e | 2010-05-13 08:13:42 +0000 | [diff] [blame] | 486 | \config{\%Ti} & Current preset id, i.e. 1-based number of the preset |
| 487 | within the presets list (usable in playlist viewer).\\ |
| 488 | \config{\%Tn} & Current preset name (usable in playlist viewer).\\ |
| 489 | \config{\%Tf} & Current preset frequency (usable in playlist viewer).\\ |
| 490 | \config{\%Tc} & Preset count, i.e. the number of stations in the current |
| 491 | preset list.\\ |
| 492 | \config{\%tx} & Is RDS available?\\ |
| 493 | \config{\%ty} & RDS name.\\ |
| 494 | \config{\%tz} & RDS text.\\ |
Alex Parker | a43fc84 | 2010-12-21 10:14:40 +0000 | [diff] [blame] | 495 | \config{\%tr} & Signal strength (RSSI). Can be used in a conditional or as |
| 496 | a bar.\\ |
Alex Parker | 0926e3e | 2010-05-13 08:13:42 +0000 | [diff] [blame] | 497 | \end{tagmap} |
| 498 | |
Alex Parker | 4b36063 | 2010-05-29 19:02:10 +0000 | [diff] [blame] | 499 | It is also possible to show ``Radio Art'' which can be used to display images |
| 500 | associated with presets. The tags are exactly the same as for album art, |
| 501 | described above. Images need to be placed in \fname{/.rockbox/fmpresets/}, |
| 502 | and must have the same name as the preset. They need to be in either |
| 503 | \fname{.bmp} or \fname{.jpg} format, and the radio must be in preset mode |
| 504 | and tuned to a preset (and not recording) in order for them to be shown. |
Alex Parker | caa68b5 | 2010-05-29 19:02:19 +0000 | [diff] [blame] | 505 | } |
Alex Parker | 4b36063 | 2010-05-29 19:02:10 +0000 | [diff] [blame] | 506 | |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 507 | \section{Alignment and language direction} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 508 | \begin{tagmap} |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 509 | \config{\%al} & Align the text left\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 510 | \config{\%aL} & Align the text left, or to the right if RTL language is in use\\ |
Alex Parker | c4b6c05 | 2009-11-22 11:24:49 +0000 | [diff] [blame] | 511 | \config{\%ac} & Centre the text\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 512 | \config{\%ar} & Align the text right\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 513 | \config{\%aR} & Align the text right, or to the left if RTL language is in use\\ |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 514 | \config{\%ax} & The next tag should follow the set language direction. When |
| 515 | prepended to a viewport declaration, the viewport will |
| 516 | be horizontally mirrored if the user language is set to |
| 517 | a RTL language. Currently the \%Cl, \%V and \%Vl tags |
| 518 | support this.\\ |
| 519 | \config{\%Sr} & Use as a conditional to define options for left to right, or |
| 520 | right to left languages. \%?Sr<RTL|LTR>\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 521 | \end{tagmap} |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 522 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 523 | All alignment tags may be present in one line, but they need to be in the |
Alex Parker | c4b6c05 | 2009-11-22 11:24:49 +0000 | [diff] [blame] | 524 | order left -- centre -- right. If the aligned texts overlap, they are merged. |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 525 | |
Alex Parker | d7cb3b1 | 2010-07-31 12:47:12 +0000 | [diff] [blame] | 526 | Example: \config{\%ax\%V(\dots)} |
| 527 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 528 | \section{Conditional Tags} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 529 | |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 530 | \begin{tagmap} |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 531 | \config{\%?xx<true|false>} |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 532 | & If / Else: Evaluate for true or false case \\ |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 533 | \config{\%?xx<alt1|alt2|\tabnlindent{}alt3|\dots|else>} |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 534 | & Enumerations: Evaluate for first / second / third / \dots / last condition \\ |
Alex Parker | 779f1db | 2010-09-17 19:13:14 +0000 | [diff] [blame] | 535 | \config{\%if(tag, operator, operand, [option count])} |
| 536 | & Allows very simple comparisons with other tags.\newline |
| 537 | \config{tag}: the tag to check against.\newline |
| 538 | \config{operator}: the comparison to perform - possible options are =, !=, |
| 539 | >, >=, <, <=\newline |
| 540 | \config{operand}: either a second tag, a number, or text.\newline |
| 541 | \config{[option count]}: optional parameter used to select which parameter |
| 542 | of a tag to use when the tag has multiple options, e.g. \%?pv<a|b|c|d>\\ |
Jonathan Gordon | 40ecdf6 | 2012-02-02 22:26:16 +1100 | [diff] [blame] | 543 | \config{\%and(tag1, tag2, ..., tagN)}\newline |
| 544 | & Logical ``and'' operator. Will be evaluate to true if all the tag parameters are true.\\ |
| 545 | \config{\%or(tag1, tag2, ..., tagN)}\newline |
| 546 | & Logical ``or'' operator. Will be evaluate to true if any of the tag parameters are true.\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 547 | \end{tagmap} |
Martin Arver | 94c1289 | 2006-03-23 14:11:52 +0000 | [diff] [blame] | 548 | |
Alex Parker | 779f1db | 2010-09-17 19:13:14 +0000 | [diff] [blame] | 549 | Examples of the \%if tag:\\ |
| 550 | |
| 551 | \config{\%?if(\%pv, >=, 0)<Clipping possible|Volume OK>} will display ``Clipping |
| 552 | possible'' if the volume is higher than or equal to 0 dB, ``Volume OK'' if it |
| 553 | is lower.\\ |
| 554 | |
| 555 | \config{\%?if(\%ia, =, \%Ia)<same artist>} -- this artist and the next artist |
| 556 | are the same.\\ |
| 557 | |
| 558 | \note{When performing a comparison against a string tag such as \%ia, only = and |
| 559 | != work, and the comparison is not case sensitive.} |
| 560 | |
Alex Parker | e56030a | 2009-05-15 21:17:21 +0000 | [diff] [blame] | 561 | \section{Subline Tags} |
| 562 | |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 563 | \begin{tagmap} |
Alexander Levin | 67f25a4 | 2010-07-02 18:54:09 +0000 | [diff] [blame] | 564 | \config{\%t(time)} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 565 | & Set the subline display cycle time (\%t(5) or \%t(3.4) formats) \\ |
Alex Parker | e56030a | 2009-05-15 21:17:21 +0000 | [diff] [blame] | 566 | \config{;} |
| 567 | & Split items on a line into separate sublines \\ |
| 568 | \end{tagmap} |
Alex Parker | e56030a | 2009-05-15 21:17:21 +0000 | [diff] [blame] | 569 | |
| 570 | Allows grouping of several items (sublines) onto one line, with the |
| 571 | display cycling round the defined sublines. See |
| 572 | \reference{ref:AlternatingSublines} for details. |
| 573 | |
Marianne Arnold | fa63211 | 2010-10-29 17:52:20 +0000 | [diff] [blame] | 574 | \opt{rtc}{ |
Marianne Arnold | e435e4d | 2009-05-16 11:22:41 +0000 | [diff] [blame] | 575 | \section{Time and Date} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 576 | \begin{tagmap} |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 577 | \config{\%cd} & Day of month from 01 to 31\\ |
| 578 | \config{\%ce} & Zero padded day of month from 1 to 31\\ |
Alexander Levin | 1242710 | 2010-07-02 19:32:48 +0000 | [diff] [blame] | 579 | \config{\%cf} & A conditional for 12/24 hour format.\newline |
| 580 | \config{\%?cf<24 hour stuff|12 hour stuff>}\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 581 | \config{\%cH} & Zero padded hour from 00 to 23 (24 hour format)\\ |
| 582 | \config{\%ck} & Hour from 0 to 23 (24 hour format)\\ |
Tomer Shalev | 13ef677 | 2010-01-08 14:03:43 +0000 | [diff] [blame] | 583 | \config{\%cI} & Zero padded hour from 01 to 12 (am/pm format)\\ |
| 584 | \config{\%cl} & Hour from 1 to 12 (am/pm format)\\ |
| 585 | \config{\%cm} & Month from 01 to 12\\ |
Dominik Riebeling | f177af4 | 2007-04-10 17:38:40 +0000 | [diff] [blame] | 586 | \config{\%cM} & Minutes\\ |
| 587 | \config{\%cS} & Seconds\\ |
Marianne Arnold | e435e4d | 2009-05-16 11:22:41 +0000 | [diff] [blame] | 588 | \config{\%cy} & 2-digit year\\ |
Dominik Riebeling | f177af4 | 2007-04-10 17:38:40 +0000 | [diff] [blame] | 589 | \config{\%cY} & 4-digit year\\ |
| 590 | \config{\%cP} & Capital AM/PM\\ |
| 591 | \config{\%cp} & Lowercase am/pm\\ |
| 592 | \config{\%ca} & Weekday name\\ |
| 593 | \config{\%cb} & Month name\\ |
| 594 | \config{\%cu} & Day of week from 1 to 7, 1 is Monday\\ |
| 595 | \config{\%cw} & Day of week from 0 to 6, 0 is Sunday\\ |
| 596 | \end{tagmap} |
Marianne Arnold | fa63211 | 2010-10-29 17:52:20 +0000 | [diff] [blame] | 597 | } |
Marianne Arnold | e435e4d | 2009-05-16 11:22:41 +0000 | [diff] [blame] | 598 | |
Alex Parker | 55c8b2b | 2010-03-21 10:20:14 +0000 | [diff] [blame] | 599 | \section{Text Translation} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 600 | \begin{tagmap} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 601 | \config{\%Sx(English)} |
Alex Parker | 55c8b2b | 2010-03-21 10:20:14 +0000 | [diff] [blame] | 602 | & Display the translation of ``English'' in the current language\\ |
| 603 | \end{tagmap} |
| 604 | |
| 605 | \begin{itemize} |
| 606 | \item ``English'' must be a phrase used in the language file. |
| 607 | \item It should match the \config{Source:} line in the language file. |
| 608 | \end{itemize} |
| 609 | |
| 610 | \note{checkwps cannot verify that the string is correct, so please check on |
| 611 | either the simulator or on target.} |
| 612 | |
| 613 | |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 614 | \opt{touchscreen}{ |
Jonathan Gordon | d7bb580 | 2010-10-28 11:11:01 +0000 | [diff] [blame] | 615 | \section{Touchscreen Areas} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 616 | \begin{tagmap} |
Jonathan Gordon | 969903b | 2011-07-28 12:53:22 +0000 | [diff] [blame] | 617 | \config{\%T(x,y,width,\tabnlindent{}height, action, [options])} |
Alexander Levin | 4c105b6 | 2010-03-07 22:12:16 +0000 | [diff] [blame] | 618 | & Invoke the action specified when the user presses in the defined |
| 619 | touchscreen area.\\ |
| 620 | \end{tagmap} |
Jonathan Gordon | 969903b | 2011-07-28 12:53:22 +0000 | [diff] [blame] | 621 | |
Jonathan Gordon | 443b134 | 2011-03-27 07:23:38 +0000 | [diff] [blame] | 622 | Possible actions are: |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 623 | |
| 624 | \begin{description} |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 625 | \item[none] -- Do nothing. |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 626 | \item[play] -- Play/pause playback. |
| 627 | \item[stop] -- Stop playback and exit the WPS. |
Jonathan Gordon | 98881fd | 2011-03-22 09:31:45 +0000 | [diff] [blame] | 628 | \item[prev] -- Previous track/item. |
| 629 | \item[next] -- Next track/item. |
Marianne Arnold | a0f3462 | 2011-05-22 12:54:52 +0000 | [diff] [blame] | 630 | \item[wps\_prev] -- Previous track. |
| 631 | \item[wps\_next] -- Next track. |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 632 | \item[ffwd] -- Seek forwards in the track. |
| 633 | \item[rwd] -- Seek backwards in the track. |
Osborne Jacobs | 595427c | 2012-03-03 00:15:31 -0500 | [diff] [blame] | 634 | \item[progressbar] -- Seek to the appropriate position in the track based on the touch. |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 635 | \item[shuffle] -- Toggle shuffle mode. |
| 636 | \item[repmode] -- Cycle through the repeat modes. |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 637 | \item[volume] -- Set the volume to the appropriate level based on the touch. |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 638 | \item[voldown] -- Decrease the volume by one step. |
| 639 | \item[volup] -- Increase the volume by one step. |
Jonathan Gordon | 605e2d0 | 2011-01-13 10:56:23 +0000 | [diff] [blame] | 640 | \item[mute] -- Un/Mute playback. |
Osborne Jacobs | 595427c | 2012-03-03 00:15:31 -0500 | [diff] [blame] | 641 | \item[createbookmark] -- Create a bookmark in the currently-playing track. |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 642 | \item[hotkey] -- Performs the action assigned to the hotkey (see Hotkeys section). |
Osborne Jacobs | 595427c | 2012-03-03 00:15:31 -0500 | [diff] [blame] | 643 | \item[menu] -- Go to the main menu. |
| 644 | \item[browse] -- Go back to the file browser or database. |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 645 | \item[resumeplayback] -- Go back to the last music screen (WPS or radio screen). |
Osborne Jacobs | 595427c | 2012-03-03 00:15:31 -0500 | [diff] [blame] | 646 | \item[quickscreen] -- Go to the quickscreen. |
| 647 | \item[contextmenu] -- Open the context menu. |
| 648 | \item[playlist] -- Go to the playlist viewer. |
| 649 | \item[listbookmarks] -- List the bookmarks for the currently-playing directory or playlist. |
| 650 | \item[trackinfo] -- Open the track info viewer. |
| 651 | \item[pitch] -- Open the pitchscreen. |
Alex Parker | b33a2d8 | 2011-01-13 18:09:36 +0000 | [diff] [blame] | 652 | \item[setting\_inc] -- Increment the subsequently specified setting (e.g |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 653 | \config{\%T(0,0,32,32, setting\_inc, volume)} increases the volume by one step). |
Alex Parker | b33a2d8 | 2011-01-13 18:09:36 +0000 | [diff] [blame] | 654 | \item[setting\_dec] -- Decrement the subsequently specified setting (e.g |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 655 | \config{\%T(0,0,32,32, setting\_dec, volume)} decreases the volume by one step). |
| 656 | \item[setting\_set] -- Set the subsequently specified setting to a specific value (e.g |
| 657 | \config{\%T(0,0,32,32, setting\_set, volume, 0)} sets the volume to 0). |
| 658 | \item[lock] -- Soft locks the touchscreen. All touch areas are disabled except for |
Marianne Arnold | a5c5da4 | 2012-05-19 12:50:24 +0200 | [diff] [blame] | 659 | areas with the lock action or ones that have the allow\_while\_locked option (see below). |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 660 | \end{description} |
Jonathan Gordon | 969903b | 2011-07-28 12:53:22 +0000 | [diff] [blame] | 661 | Any (or muliple) of the following options can be used after the action is specified |
| 662 | \subsection{Options} |
| 663 | \begin{description} |
Osborne Jacobs | 67b4b2a | 2012-03-13 02:28:12 -0400 | [diff] [blame] | 664 | \item[repeat\_press] -- This area will trigger mulitple times when held (i.e for seeking) |
| 665 | \item[long\_press] -- This area will trigger once after it is held for a long press |
| 666 | \item[reverse\_bar] -- Reverse the bars touch direction (i.e seek right to left) |
| 667 | \item[allow\_while\_locked] -- Allows the area to be pressable when the |
Jonathan Gordon | 969903b | 2011-07-28 12:53:22 +0000 | [diff] [blame] | 668 | skin is locked by the lock touch action |
| 669 | \end{description} |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 670 | |
Jonathan Gordon | d7bb580 | 2010-10-28 11:11:01 +0000 | [diff] [blame] | 671 | \section{Last Touchscreen Press} |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 672 | \begin{tagmap} |
Alexander Levin | 4c105b6 | 2010-03-07 22:12:16 +0000 | [diff] [blame] | 673 | \config{\%Tl} & Indicates that the touchscreen is pressed.\\ |
| 674 | \end{tagmap} |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 675 | This tag can be used to display text or images or a viewport when the |
| 676 | touchscreen is pressed (like an On Screen Display). If you put a number |
| 677 | straight after \%Tl it will be used as a timeout in seconds |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 678 | (e.g \%Tl(2.5) will give a 2.5 second timeout) between the touchscreen press |
Alex Parker | f7a397b | 2010-02-28 11:50:11 +0000 | [diff] [blame] | 679 | being released and the tag going false. If no number is specified it will |
| 680 | use a 1 second timeout. It can also be used as a conditional, and can be |
| 681 | used with conditional viewports. |
| 682 | } |
Dominik Riebeling | f177af4 | 2007-04-10 17:38:40 +0000 | [diff] [blame] | 683 | |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 684 | \section{\label{ref:bar_tags}Bar Tags} |
| 685 | Some tags can be used to display a bar which draws according to the value of |
| 686 | the tag. To use these tags like a bar you need to use the following parameters |
| 687 | (\%XX should be replaced with the actual tag). |
Jonathan Gordon | d336eb3 | 2012-06-24 21:52:18 +1000 | [diff] [blame] | 688 | |
| 689 | \opt{touchscreen}{ |
| 690 | Volume and progress bars automatically create touch regions the same size |
| 691 | as the bar (slightly larger actually). This can be disabled with the |
| 692 | \config{notouch} option. |
| 693 | } |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 694 | |
| 695 | \begin{tagmap} |
Jonathan Gordon | 9acd242 | 2010-10-12 12:46:57 +0000 | [diff] [blame] | 696 | \config{\%XX(x, y, width, height, [options])} |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 697 | & Draw the specified tag as a bar\newline |
| 698 | \config{x}: x co-ordinate at which to start drawing the bar.\newline |
| 699 | \config{y}: y co-ordinate at which to start drawing the bar.\newline |
| 700 | \config{width}: width of the bar (- for the full viewport width).\newline |
| 701 | \config{height}: height of the bar (- to set to the font height for |
| 702 | horizontal bars and to the viewport height for vertical bars).\newline |
| 703 | \config{options}: any of the options set out below.\\ |
| 704 | \end{tagmap} |
| 705 | |
| 706 | \subsection{Options} |
| 707 | \begin{description} |
Jonathan Gordon | 9acd242 | 2010-10-12 12:46:57 +0000 | [diff] [blame] | 708 | \item[image] -- the next option is either the filename or image label to |
| 709 | use for the fill image. |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 710 | \item[horizontal] -- force the bar to be drawn horizontally. |
| 711 | \item[vertical] -- force the bar to be drawn vertically. |
| 712 | \item[invert] -- invert the draw direction (i.e. right to left, or top to |
| 713 | bottom). |
Jonathan Gordon | f06f685 | 2011-01-24 09:04:28 +0000 | [diff] [blame] | 714 | \item[slider] -- draw a preloaded image over the top of the bar so that |
Alex Parker | f70ec76 | 2010-10-12 19:34:47 +0000 | [diff] [blame] | 715 | the centre of the image matches the current position. This must be |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 716 | followed by the label of the desired image. |
Jonathan Gordon | f06f685 | 2011-01-24 09:04:28 +0000 | [diff] [blame] | 717 | \item[backdrop] -- draw a preloaded image under the bar. The full |
| 718 | image will be displayed and must be the same size as the bar. |
| 719 | This must be followed by the label of the desired image. |
Alex Parker | f70ec76 | 2010-10-12 19:34:47 +0000 | [diff] [blame] | 720 | \item[nofill] -- don't draw the bar, only its frame (for use with the |
| 721 | ``slider'' option). |
| 722 | \item[nobar] -- don't draw the bar or its frame (for use with the |
| 723 | ``slider'' option). |
Jonathan Gordon | d336eb3 | 2012-06-24 21:52:18 +1000 | [diff] [blame] | 724 | \opt{touchscreen}{ |
| 725 | \item[notouch] -- don't create the touchregion for progress/volume bars. |
| 726 | } |
Jonathan Gordon | 65f9df3 | 2012-07-05 22:44:13 +1000 | [diff] [blame] | 727 | \item[setting] -- Specify the setting name to draw the bar from (bar must be |
| 728 | \%St type), the next param is the settings config name. |
Alex Parker | 15258e0 | 2010-09-17 19:13:20 +0000 | [diff] [blame] | 729 | \end{description} |
| 730 | |
| 731 | Example: \config{\%pb(0,0,-,-,-,nofill, slider, slider\_image, invert)} -- draw |
| 732 | a horizontal progressbar which doesn't fill and draws the image |
| 733 | ``slider\_image'' which moves right to left. |
| 734 | |
Alex Parker | f70ec76 | 2010-10-12 19:34:47 +0000 | [diff] [blame] | 735 | \note{If the slider option is used, the bar will be shrunk so that the slider |
Jonathan Gordon | a3ec848 | 2012-07-03 13:14:13 +1000 | [diff] [blame] | 736 | fits inside the specified width and height. Example: A 100px bar image with a |
| 737 | 16px slider image needs the bar to be 116px wide, and should be offset 8px |
| 738 | left of the backdrop image to align correctly.} |
Teruaki Kawashima | 3eb5826 | 2010-10-12 12:17:39 +0000 | [diff] [blame] | 739 | |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 740 | \section{Other Tags} |
Jonathan Gordon | 31a0595 | 2012-02-26 00:42:53 +1100 | [diff] [blame] | 741 | |
| 742 | \begin{tagmap} |
| 743 | \config{\%ss(start, length, tag [,number]} & Get a substring from another tag.\\ |
| 744 | \end{tagmap} |
| 745 | Use this tag to get a substring from another tag. |
| 746 | \begin{description} |
Jonathan Gordon | b2202a3 | 2012-03-27 23:42:00 +1100 | [diff] [blame] | 747 | \item[start] -- first character to take (0 being the start of the string, negative means from the end of the string) |
Jonathan Gordon | 31a0595 | 2012-02-26 00:42:53 +1100 | [diff] [blame] | 748 | \item[length] -- length of the substring to return (- for the rest of the string) |
| 749 | \item[tag] -- tag to get |
| 750 | \item[number] -- OPTIONAL. if this is present it will assume the |
| 751 | substring is a number so it can be used with conditionals. (i.e \config{\%cM}). |
| 752 | 0 is the first conditional option |
| 753 | \end{description} |
| 754 | |
Michael Chicoine | 65dc4f2 | 2010-03-23 12:02:20 +0000 | [diff] [blame] | 755 | \begin{tagmap} |
Alex Parker | 64d4ddf | 2010-06-20 12:58:41 +0000 | [diff] [blame] | 756 | \config{\%(} & The character `('\\ |
| 757 | \config{\%)} & The character `)'\\ |
| 758 | \config{\%,} & The character `,'\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 759 | \config{\%\%} & The character `\%'\\ |
Alexander Levin | 15d0ac0 | 2010-07-02 19:55:47 +0000 | [diff] [blame] | 760 | \config{\%<} & The character `<'\\ |
| 761 | \config{\%|} & The character `|'\\ |
| 762 | \config{\%>} & The character `>'\\ |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 763 | \config{\%;} & The character `;'\\ |
Marianne Arnold | 498f66f | 2010-10-12 19:13:24 +0000 | [diff] [blame] | 764 | \config{\%\#} & The character `\#'\\ |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 765 | \config{\%s} & Indicate that the line should scroll. Can occur |
| 766 | anywhere in a line (given that the text is |
| 767 | displayed; see conditionals above). You can specify |
Alexander Levin | 0a24140 | 2009-03-23 21:46:49 +0000 | [diff] [blame] | 768 | up to ten scrolling lines. Scrolling lines can not |
Martin Arver | f21f914 | 2006-05-08 21:32:44 +0000 | [diff] [blame] | 769 | contain dynamic content such as timers, peak meters |
| 770 | or progress bars.\\ |
Dominik Riebeling | 36a3133 | 2006-04-09 21:22:42 +0000 | [diff] [blame] | 771 | \end{tagmap} |
Alexander Levin | 4c105b6 | 2010-03-07 22:12:16 +0000 | [diff] [blame] | 772 | |