|
|
@@ -21,113 +21,115 @@ namespace gameplay
|
|
|
* are associated with a Control, and Font properties to apply to a Control's text.
|
|
|
*
|
|
|
* Below is an explanation of the properties that can be set within themes:
|
|
|
- *
|
|
|
- * theme
|
|
|
- * {
|
|
|
- * texture = <Path to texture>
|
|
|
- *
|
|
|
- * // Describes a single image, to be used as a cursor.
|
|
|
- * cursor <Cursor ID>
|
|
|
- * {
|
|
|
- * region = <x, y, width, height>
|
|
|
- * color = <#ffffffff>
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Describes all the images used by a control for one or more states.
|
|
|
- * imageList <ImageList ID>
|
|
|
- * {
|
|
|
- * image checked
|
|
|
- * {
|
|
|
- * region = <x, y, width, height>
|
|
|
- * }
|
|
|
- *
|
|
|
- * image unchecked
|
|
|
- * {
|
|
|
- * region = <x, y, width, height>
|
|
|
- * color = <#fffffffff> // Optionally override image-list color.
|
|
|
- * }
|
|
|
- *
|
|
|
- * color = <#fffffffff> // Default blend color for images that don't specify their own.
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Defines the border and background of a Control.
|
|
|
- * skin <Skin ID>
|
|
|
- * {
|
|
|
- * // The corners and edges of the given region will be used as border sprites.
|
|
|
- * border
|
|
|
- * {
|
|
|
- * top = <int> // Height of top border, top corners.
|
|
|
- * bottom = <int> // Height of bottom border, bottom corners.
|
|
|
- * left = <int> // Width of left border, left corners.
|
|
|
- * right = <int> // Width of right border, right corners.
|
|
|
- * }
|
|
|
- *
|
|
|
- * region = <x, y, width, height> // Total container region including entire border.
|
|
|
- * color = <#ffffffff> // Tint to apply to skin.
|
|
|
- * }
|
|
|
- *
|
|
|
- * style <Style ID>
|
|
|
- * {
|
|
|
- * // Layouts may make use of a style's margin to put space between adjacent controls.
|
|
|
- * margin
|
|
|
- * {
|
|
|
- * top = <int>
|
|
|
- * bottom = <int>
|
|
|
- * left = <int>
|
|
|
- * right = <int>
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Padding is the space between a control's border and its content.
|
|
|
- * padding
|
|
|
- * {
|
|
|
- * top = <int>
|
|
|
- * bottom = <int>
|
|
|
- * left = <int>
|
|
|
- * right = <int>
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Properties used when in control is in the normal state.
|
|
|
- * stateNormal
|
|
|
- * {
|
|
|
- * skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
- * imageList = <ImageList ID>
|
|
|
- *
|
|
|
- * cursor = <Cursor ID> // Cursor to use when the mouse is over this control.
|
|
|
- * font = <Path to font> // Font to use for rendering text.
|
|
|
- * fontSize = <int> // Size of text.
|
|
|
- * textColor = <#ffffffff> // Color of text.
|
|
|
- * alignment = <Text alignment constant> // Member of Font::Justify enum.
|
|
|
- * rightToLeft = <bool> // Whether to draw text from right to left.
|
|
|
- * opacity = <float> // Opacity to apply to all text/border/icon colors.
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Properties used when in control is in the focus state
|
|
|
- * // If not specified, the 'normal' overlay will be used.
|
|
|
- * stateFocus
|
|
|
- * {
|
|
|
- * skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
- * ...
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Properties used when in control is in the focus.
|
|
|
- * // This is when a touch/mouse is down within the control.
|
|
|
- * // If not specified, the 'normal' overlay will be used.
|
|
|
- * stateActive
|
|
|
- * {
|
|
|
- * skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
- * ...
|
|
|
- * }
|
|
|
- *
|
|
|
- * // Properties used when in control is in the focus.
|
|
|
- * // This is when a touch/mouse is down within the control.
|
|
|
- * // If not specified, the 'normal' overlay will be used.
|
|
|
- * state-disabled
|
|
|
- * {
|
|
|
- * skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
- * ...
|
|
|
- * }
|
|
|
- * }
|
|
|
- * }
|
|
|
+
|
|
|
+@verbatim
|
|
|
+ theme
|
|
|
+ {
|
|
|
+ texture = <Path to texture>
|
|
|
+
|
|
|
+ // Describes a single image, to be used as a cursor.
|
|
|
+ cursor <Cursor ID>
|
|
|
+ {
|
|
|
+ region = <x, y, width, height>
|
|
|
+ color = <#ffffffff>
|
|
|
+ }
|
|
|
+
|
|
|
+ // Describes all the images used by a control for one or more states.
|
|
|
+ imageList <ImageList ID>
|
|
|
+ {
|
|
|
+ image checked
|
|
|
+ {
|
|
|
+ region = <x, y, width, height>
|
|
|
+ }
|
|
|
+
|
|
|
+ image unchecked
|
|
|
+ {
|
|
|
+ region = <x, y, width, height>
|
|
|
+ color = <#fffffffff> // Optionally override image-list color.
|
|
|
+ }
|
|
|
+
|
|
|
+ color = <#fffffffff> // Default blend color for images that don't specify their own.
|
|
|
+ }
|
|
|
+
|
|
|
+ // Defines the border and background of a Control.
|
|
|
+ skin <Skin ID>
|
|
|
+ {
|
|
|
+ // The corners and edges of the given region will be used as border sprites.
|
|
|
+ border
|
|
|
+ {
|
|
|
+ top = <int> // Height of top border, top corners.
|
|
|
+ bottom = <int> // Height of bottom border, bottom corners.
|
|
|
+ left = <int> // Width of left border, left corners.
|
|
|
+ right = <int> // Width of right border, right corners.
|
|
|
+ }
|
|
|
+
|
|
|
+ region = <x, y, width, height> // Total container region including entire border.
|
|
|
+ color = <#ffffffff> // Tint to apply to skin.
|
|
|
+ }
|
|
|
+
|
|
|
+ style <Style ID>
|
|
|
+ {
|
|
|
+ // Layouts may make use of a style's margin to put space between adjacent controls.
|
|
|
+ margin
|
|
|
+ {
|
|
|
+ top = <int>
|
|
|
+ bottom = <int>
|
|
|
+ left = <int>
|
|
|
+ right = <int>
|
|
|
+ }
|
|
|
+
|
|
|
+ // Padding is the space between a control's border and its content.
|
|
|
+ padding
|
|
|
+ {
|
|
|
+ top = <int>
|
|
|
+ bottom = <int>
|
|
|
+ left = <int>
|
|
|
+ right = <int>
|
|
|
+ }
|
|
|
+
|
|
|
+ // Properties used when in control is in the normal state.
|
|
|
+ stateNormal
|
|
|
+ {
|
|
|
+ skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
+ imageList = <ImageList ID>
|
|
|
+
|
|
|
+ cursor = <Cursor ID> // Cursor to use when the mouse is over this control.
|
|
|
+ font = <Path to font> // Font to use for rendering text.
|
|
|
+ fontSize = <int> // Size of text.
|
|
|
+ textColor = <#ffffffff> // Color of text.
|
|
|
+ alignment = <Text alignment constant> // Member of Font::Justify enum.
|
|
|
+ rightToLeft = <bool> // Whether to draw text from right to left.
|
|
|
+ opacity = <float> // Opacity to apply to all text/border/icon colors.
|
|
|
+ }
|
|
|
+
|
|
|
+ // Properties used when in control is in the focus state
|
|
|
+ // If not specified, the 'normal' overlay will be used.
|
|
|
+ stateFocus
|
|
|
+ {
|
|
|
+ skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
+ // Properties used when in control is in the focus.
|
|
|
+ // This is when a touch/mouse is down within the control.
|
|
|
+ // If not specified, the 'normal' overlay will be used.
|
|
|
+ stateActive
|
|
|
+ {
|
|
|
+ skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
+ ...
|
|
|
+ }
|
|
|
+
|
|
|
+ // Properties used when in control is in the focus.
|
|
|
+ // This is when a touch/mouse is down within the control.
|
|
|
+ // If not specified, the 'normal' overlay will be used.
|
|
|
+ state-disabled
|
|
|
+ {
|
|
|
+ skin = <Skin ID> // Skin to use for border and background sprites.
|
|
|
+ ...
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+@endverbatim
|
|
|
*
|
|
|
*/
|
|
|
class Theme: public Ref
|