Open main menu

Difference between revisions of "GUI Themes/STX Syntax"

adapt to recent theme parser changes
(→‎<text>: Update "text" draw step documentation.)
(adapt to recent theme parser changes)
Line 12: Line 12:


<syntax type="xml">
<syntax type="xml">
<render_info resolution = "320x240">
<render_info resolution = "y>399">
     ...
     ...
</render_info>
</render_info>
Line 23: Line 23:
===== Properties =====
===== Properties =====


* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 116: Line 116:


* <tt>filename [string]</tt>: Path and filename to the bitmap file.
* <tt>filename [string]</tt>: Path and filename to the bitmap file.
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 173: Line 173:
* <tt>id [string]</tt>: Unique font identifier.
* <tt>id [string]</tt>: Unique font identifier.
* <tt>file [string]</tt>: External Font file to load. Use &quot;default&quot; to let the renderer choose the most appropriate default font based on the active resolution (usually an builtin one).
* <tt>file [string]</tt>: External Font file to load. Use &quot;default&quot; to let the renderer choose the most appropriate default font based on the active resolution (usually an builtin one).
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 266: Line 266:
* <tt>hotspot [int, int]</tt>: Coordinates for the point in the bitmap which will be used for click calculations.
* <tt>hotspot [int, int]</tt>: Coordinates for the point in the bitmap which will be used for click calculations.
* <tt>scale [int]</tt>: Scale at which this cursor is supposed to be used.
* <tt>scale [int]</tt>: Scale at which this cursor is supposed to be used.
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 317: Line 317:
* <tt>id [string]</tt>: Unique identifier for the drawing asset.
* <tt>id [string]</tt>: Unique identifier for the drawing asset.
* <tt>cache [bool]</tt>: Lets the renderer know that this drawing asset may be cached for performance.
* <tt>cache [bool]</tt>: Lets the renderer know that this drawing asset may be cached for performance.
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 463: Line 463:


<syntax type="xml">
<syntax type="xml">
<layout_info resolution = '320xY'>
<layout_info resolution = 'y>399'>
     ...
     ...
</layout_info>
</layout_info>
Line 474: Line 474:
===== Properties =====
===== Properties =====


* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 509: Line 509:
<syntax type="xml">
<syntax type="xml">
<def var = 'WidgetSize' value = 'kBigWidgetSize' />
<def var = 'WidgetSize' value = 'kBigWidgetSize' />
<def resolution = '320xY' var = 'WidgetSize' value = 'kNormalWidgetSize' />
<def resolution = 'y>399' var = 'WidgetSize' value = 'kNormalWidgetSize' />
</syntax>
</syntax>


Line 546: Line 546:
** kNormalWidgetSize
** kNormalWidgetSize
** kBigWidgetSize
** kBigWidgetSize
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 600: Line 600:
* <tt>size [int, int]</tt>: Width and height of the widget. You may use previously declared <tt>def</tt>s or builtin constants instead of integers.
* <tt>size [int, int]</tt>: Width and height of the widget. You may use previously declared <tt>def</tt>s or builtin constants instead of integers.
* <tt>padding [int, int, int, int]</tt>: Pixel padding for Left, Right, Top and Bottom sides, respectively.
* <tt>padding [int, int, int, int]</tt>: Pixel padding for Left, Right, Top and Bottom sides, respectively.
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
Line 671: Line 671:
* <tt>enabled [bool]</tt>: Sets whether this dialog is enabled. Defaults always to true. May be used to disable dialogs on certain resolutions.
* <tt>enabled [bool]</tt>: Sets whether this dialog is enabled. Defaults always to true. May be used to disable dialogs on certain resolutions.
* <tt>inset [int]</tt>: Sets the inset value for Screen and Dialog overlays (the amount by which the new dialog is contracted).
* <tt>inset [int]</tt>: Sets the inset value for Screen and Dialog overlays (the amount by which the new dialog is contracted).
* <tt>resolution [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.


-----
-----
24

edits