Difference between revisions of "GUI Themes/STX Syntax"

Jump to navigation Jump to search
2,102 bytes added ,  14:02, 10 August 2009
→‎STX Syntax Keys: add documentation for "text_color".
(→‎<font>: update "font" configuration documentation)
(→‎STX Syntax Keys: add documentation for "text_color".)
Line 174: Line 174:
* <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 [int x int]</tt>: Load only on a given resolution. See resolution-dependant keys.
-----
==== <tt>&lt;text_color&gt;</tt> ====
Parent: <tt>&lt;fonts&gt;</tt><br />
Children: -<br />
Properties: <tt>id</tt> (''required''), <tt>color</tt> (''required'')
===== Example =====
<syntax type="xml">
<text_color id = 'color_normal'
            color = 'black'
/>
</syntax>
===== Description =====
The GUI code allows the different draw steps to specify a color to draw the text data in. The user can specify the colors for different (currently predefined) text types via this.
===== Required text color identifiers =====
Here is a list of the currently available text color types. All need to be defined by the theme configuration file.
* <tt>color_normal</tt>: This should be the default color.
* <tt>color_normal_hover</tt>: The default color for hovered widgets.
* <tt>color_normal_disabled</tt>: The default color for disabled widgets.
* <tt>color_normal_inverted</tt>: The default color for inverted text, like used in the ListWidget.
* <tt>color_alternative</tt>: An alternative color, which the widgets might use.
* <tt>color_alternative_hover</tt>: The hovered version of the alternative color.
* <tt>color_alternative_disabled</tt>: The disabled version of the alternative color.
* <tt>color_alternative_inverted</tt>: The inverted version of the alternative color.
* <tt>color_button</tt>: The color to be used in button widgets.
* <tt>color_button_hover</tt>: Hovered version of the button widget text color.
* <tt>color_button_disabled</tt>: Disabled version of the button widget text color.
For performance reasons, these identifiers are unique and limited (i.e. the parser doesn't expect any other custom identifiers). Future versions of the Theme Format may allow for custom Fonts specific to certain widgets.
The GUI code itself relies only on "color_normal*" and "color_alternative*" to be present. The button color is there to allow different text colors of the button text's, like used in the modern theme of ScummVM.
===== Properties =====
* <tt>id [string]</tt>: Unique color identifier.
* <tt>color [int, int, int|string]</tt>: Color to draw the text with.


-----
-----
561

edits

Navigation menu