rockbox/apps/gui/skin_engine
Frank Gevaerts a20d77dba0 Allow %?Sp<...> to be used as a conditional
When there are two choices (i.e. boolean), choose the first one if the
pitch is different from the normal value, and choose the second one if the
pitch is the same as the normal value.

When there are more than two choices (i.e. enum), the left half of the
choices are used to show 0..normal range, and the right half of the
choices are used to show values over that range.  The last entry is used
when it is set to the normal setting, following the rockbox convention to
use the last entry for special values.

  2 items: %?Sp<0..99 or 101..infinity|100>
  3 items: %?Sp<0..99|101..infinity|100>
  4 items: %?Sp<0..49|50..99|101..infinity|100>
  5 items: %?Sp<0..49|50..99|101..149|150..infinity|100>
  6 items: %?Sp<0..33|34..66|67..99|101..133|134..infinity|100>
  7 items: %?Sp<0..33|34..66|67..99|101..133|134..167|167..infinity|100>

This will allow two expected use cases:

 (1) %?Sp<%Sp> to show the pitch only when playing at a modified pitch.

 (2) %?Sp<%xdAa|%xdAb|> to show an icon of Darth Vader (subpicture 1
     of image A) when playing at a lower pitch than the original, and to
     show an icon of a chipmunk (subpicture 2 of image A) when playing at
     a higher pitch than the original.  When playing at a normal pitch,
     nothing is shown.

Flyspray: FS#10680
Author: Junio C Hamano



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23589 a1c6a512-1295-4272-9138-f99709370657
2009-11-09 17:43:46 +00:00
..
skin_buffer.c Remove some trailing whitespaces in in the skin engine files. 2009-09-13 12:24:14 +00:00
skin_buffer.h move the statically allocated tokens array into the skin buffer. this is done with a little bit of magic with the buffer... explanation in the comments but breifly, tokens + images are stored at the front of the buffer, everything else (constant sizes) are stored at the back, the 2 ends meet when the buffer is full. 2009-08-19 04:19:08 +00:00
skin_display.c Fix viewport "UI area" to work based on what was agreed on last week in the mailing lists and IRC: 2009-11-04 05:10:53 +00:00
skin_engine.h Fix the WPS to work properly with the statusbar for the previous change.. Side effect is it fixes FS#10721 where %pb didnt work 2009-11-04 05:24:30 +00:00
skin_parser.c Remove wps_data.remote_wps. It's redundant with the new global curr_screen. 2009-11-04 07:14:02 +00:00
skin_tokens.c Allow %?Sp<...> to be used as a conditional 2009-11-09 17:43:46 +00:00
skin_tokens.h fix red.. markers need to be outside #ifdefs 2009-11-09 05:03:33 +00:00
wps_debug.c Add a bunch of markers into the tokens enum to make figuring out which token isnt in the bugout output easier. ("FIXME code(80)" is alot worse than "FIXME: TOKEN_MARKER_SOUND+5") 2009-11-09 04:46:19 +00:00
wps_internals.h Remove wps_data.remote_wps. It's redundant with the new global curr_screen. 2009-11-04 07:14:02 +00:00