This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11084 - Custom variables for WPS
Attached to Project:
Rockbox
Opened by Jens Theeß (punkt) - Sunday, 07 March 2010, 19:07 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Sunday, 27 March 2011, 10:02 GMT+2
Opened by Jens Theeß (punkt) - Sunday, 07 March 2010, 19:07 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Sunday, 27 March 2011, 10:02 GMT+2
|
DetailsThis patch adds support for custom variables for the wps. This could be used e.g. to toggle between album art, playlist info and song info.
New tags are: * %vd|identifier|number of states| Defines a variable. The value is a number between 0 and number-of-states -1. * %vg'identifier' Displays the content of the variable, can be used as a conditional. * New action for %T: vt'identifier' Toggles (increases) the variable with the given identifier. If the maximum state for the variable is reached, it is reset to 0. Currently a variable can only be changed using a touch-region. Related forum topic: http://forums.rockbox.org/index.php?topic=23083.0 Patch for the manual will follow if there are no objections to this patch. Attached is a theme used for testing the patch on the Cowon D2. |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Sunday, 27 March 2011, 10:02 GMT+2
Reason for closing: Accepted
Additional comments about closing: sort of accepted in r29655
Sunday, 27 March 2011, 10:02 GMT+2
Reason for closing: Accepted
Additional comments about closing: sort of accepted in r29655
* %vl|identifier|number of states|
Defines a variable. The value is a number between 0 and number-of-states -1.
* %vd'identifier'
Displays the content of the variable, can be used as a conditional.
Renamed the touch action to "vs" (for variable set).
Extended the touch action. You can optionally set the target value instead of toggling:
vs'identifier'[value]
Examples:
%vl|a|3|
%?vda<foo|bar|baz>
%T|0|0|88|20|vsa|
%T|0|0|45|20|vsa0|
Also, I moved the evaluation of the touch action from wps_get_touchaction() to gui_wps_show().
vs'identifier'<+|-|number>
+: Increases the variable (with wrap-around)
-: Decreases the variable (with wrap-around)
number: sets the variable to the given number
Examples:
%T|0|0|88|20|vsa+|
%T|0|0|88|20|vsa-|
%T|0|0|88|20|vsa2|
I think this patch is about finished now.