Difference between revisions of "GUI Themes/Specs"

Jump to navigation Jump to search
38 bytes added ,  12:45, 16 March 2023
→‎Resolution-dependent keys and layouts: >= and <= are now supported
m (Text replacement - "</source>" to "</syntaxhighlight>")
(→‎Resolution-dependent keys and layouts: >= and <= are now supported)
 
(One intermediate revision by one other user not shown)
Line 80: Line 80:
Here's a schematic overview of the layout of keys in a STX file:
Here's a schematic overview of the layout of keys in a STX file:


<source lang="xml">
<syntaxhighlight lang="xml">
<render_info>
<render_info>
     <palette>
     <palette>
Line 126: Line 126:
The resolution property must contain one or more resolution dimension limits, comma separated, for which the given key is supposed to be loaded. Resolutions without any modifiers will force the theme to be loaded in all resolutions. Here are a few examples:
The resolution property must contain one or more resolution dimension limits, comma separated, for which the given key is supposed to be loaded. Resolutions without any modifiers will force the theme to be loaded in all resolutions. Here are a few examples:


<source lang="xml">
<syntaxhighlight lang="xml">
/* Key will be loaded in all resolutions */
/* Key will be loaded in all resolutions */
<render_info>
<render_info>


/* Key will ONLY be loaded in resolutions with 400 width or more */
/* Key will ONLY be loaded in resolutions with 400 width or more */
<render_info resolution = 'y>399'>
<render_info resolution = 'y>=400'>


/* Key will ONLY be loaded in resolutions with less than 400 height */
/* Key will ONLY be loaded in resolutions with less than 400 height */
Line 139: Line 139:
Note that the Theme Parser does not assert on repeated keys or values, it just replaces them accordingly. For instance, the following variable definition:
Note that the Theme Parser does not assert on repeated keys or values, it just replaces them accordingly. For instance, the following variable definition:


<source lang="xml">
<syntaxhighlight lang="xml">
<def var = 'TestVar' value = '100'/>
<def var = 'TestVar' value = '100'/>
<def var = 'TestVar' value = '200' resolution = 'y>399'/>
<def var = 'TestVar' value = '200' resolution = 'y>=400'/>
</syntaxhighlight>
</syntaxhighlight>


Line 148: Line 148:
The &quot;proper&quot; way to do that multi-resolution assignment would obviously be:
The &quot;proper&quot; way to do that multi-resolution assignment would obviously be:


<source lang="xml">
<syntaxhighlight lang="xml">
<def var = 'TestVar' value = '100' resolution = 'y<400'/>
<def var = 'TestVar' value = '100' resolution = 'y<400'/>
<def var = 'TestVar' value = '200' resolution = 'y>399'/>
<def var = 'TestVar' value = '200' resolution = 'y>399'/>

Navigation menu