6.2 The style-parameters section
(style-parameters ....)
(style-parameters)
(style-parameters ; ParamName Default Min Max (continuous-slider SPEED 1.0 1.0 2.0) (discrete-slider BALLOONS 2 0 8) ; CheckBox ParamName Default (on/off) (switch SHOW_CAPTIONS on) ; ComboBox ParamName Default ListOfValues (one-of-many CAKE WeddingCake (WeddingCake BirthdayCake NewYearCake)) ; RadioButtons ParamName Default ListOfValues (one-of-few CAPTION_POS Bottom (Top Middle Bottom)) ; ColorPicker ParamName Default (0x00RRGGBB) (color FADE_TO_COLOR 0x00FFFFFF))
The value of any parameter can be accessed simply by using its name wherever the currently set value is required.
6.2.1 continuous-slider
; ParamName Default Min Max (continuous-slider SPEED 1.0 1.0 2.0)
SPEED en-US Speed SPEED_MIN en-US Low SPEED_MAX en-US High
6.2.2 discrete-slider
; ParamName Default Min Max (discrete-slider BALLOONS 2 0 8)
Similar to continuous-slider` above except that the values are integral.
6.2.3 switch
; CheckBox ParamName Default (on/off) (switch SHOW_CAPTIONS on)
Defines a check-box kind of parameter - a parameter that can have either on or off as its value. The display name can be specified via the strings.txt file just like continuous-slider above.
6.2.4 one-of-many and one-of-few
; ComboBox ParamName Default ListOfValues (one-of-many CAKE WeddingCake (WeddingCake BirthdayCake NewYearCake)) ; RadioButtons ParamName Default ListOfValues (one-of-few CAPTION_POS Bottom (Top Middle Bottom))
one-of-many creates a drop-down list of items that the user can select from and one-of-few creates a set of radio buttons. Although both are about selecting one item from a set, the name difference is used as an indicator to the GUI about the control to display.
(case CAKE ('WeddingCake ....) ('BirthdayCake ....) ('NewYearCake ....))
CAKE en-US Cake type WeddingCake en-US A 3-storey wedding cake BirthdayCake en-US Happy Birthday! NewYearCake en-US Happy New Year!
6.2.5 color
; ColorPicker ParamName Default (0x00RRGGBB) (color FADE_TO_COLOR 0x00FFFFFF)
Defines a color selection parameter. In the UI, this parameter should be displayed as a color swatch (i.e. rectangle showing the current color), which when clicked brings up the standard color picker control.
6.2.6 Responding to style parameters
Style parameters are just plain values - either numeric or symbolic. You can use the current settings of a style’s parameters to compute any aspect of the muvee. A parameter’s symbol becomes automatically defined to the current value of the style’s control at the time a muvee is made.
(define scaling-factor (/ 1.0 SPEED))