New skin tag: %if(<tag>, <operator>, <operand> [,option count]) which lets you do...
commit99a4ed8f169f02f451004ad8addc107227e42e30
authorjdgordon <jdgordon@a1c6a512-1295-4272-9138-f99709370657>
Thu, 19 Aug 2010 13:49:32 +0000 (19 13:49 +0000)
committerjdgordon <jdgordon@a1c6a512-1295-4272-9138-f99709370657>
Thu, 19 Aug 2010 13:49:32 +0000 (19 13:49 +0000)
treef70f9dc4ac88f018ac537971c8ead37f5c290920
parent52b3bf533260ebbed4ad18baea89bf6d7f30a2cd
New skin tag: %if(<tag>, <operator>, <operand> [,option count]) which lets you do very simple logical comparissons on other tags.
<tag> is the tag to check against
<operator> is the comparisson to do, any one of... =, !=, >, >=, <, <=    (when comparring against a string tag like %ia only = and != work, and it is done NOT case sensitive)
<operand> is either another tag, a number, or text.
[option count] is an optinal number to use for the few tags which scale to the amount of options when used as a conditional (i.e %?pv<a|b|c|d> would have 4 options)

example: %?if(%pv, >=, 0)<Warning.. volume clipping|coool...>
That says "If the value from %pv (volume) is greater than or equal to 0 then display the warning line, otherwise the cool line."
%?if(%ia, =, %Ia)<same artist>   <= this artist and next artist are the same.

some tags might need a touch of tweaking to work better with this. experiment and have fun

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27846 a1c6a512-1295-4272-9138-f99709370657
apps/gui/skin_engine/skin_parser.c
apps/gui/skin_engine/skin_tokens.c
apps/gui/skin_engine/wps_internals.h
lib/skin_parser/skin_parser.c
lib/skin_parser/tag_table.c
lib/skin_parser/tag_table.h