Difference between revisions of "GUI Themes/STX Syntax"

Jump to navigation Jump to search
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
(Fix syntax highlighting)
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Line 11: Line 11:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<render_info resolution = "y>399">
<render_info resolution = "y>399">
     ...
     ...
Line 35: Line 35:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<palette>
<palette>
     ...
     ...
Line 55: Line 55:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<color name = 'red'
<color name = 'red'
         rgb = '255, 0, 0'
         rgb = '255, 0, 0'
Line 82: Line 82:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<bitmaps>
<bitmaps>
     ...
     ...
Line 103: Line 103:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<bitmap filename = 'logo.bmp'/>
<bitmap filename = 'logo.bmp'/>
</source>
</source>
Line 128: Line 128:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<fonts>
<fonts>
     ...
     ...
Line 149: Line 149:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<font  id = 'text_default'
<font  id = 'text_default'
         file = 'default'
         file = 'default'
Line 185: Line 185:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<text_color id = 'color_normal'
<text_color id = 'color_normal'
             color = 'black'
             color = 'black'
Line 230: Line 230:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<defaults fill = 'gradient' fg_color = 'white' bevel_color = '237, 169, 72'/>
<defaults fill = 'gradient' fg_color = 'white' bevel_color = '237, 169, 72'/>
</source>
</source>
Line 251: Line 251:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<cursor file = 'cursor.bmp' hotspot = '0, 0' scale = '3'/>
<cursor file = 'cursor.bmp' hotspot = '0, 0' scale = '3'/>
</source>
</source>
Line 278: Line 278:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<drawdata id = 'mainmenu_bg' cache = false>
<drawdata id = 'mainmenu_bg' cache = false>
     <drawstep  ...
     <drawstep  ...
Line 329: Line 329:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<drawstep  func = 'roundedsq'
<drawstep  func = 'roundedsq'
             radius = '6'
             radius = '6'
Line 414: Line 414:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<text  font = 'text_button'
<text  font = 'text_button'
         text_color = 'color_button'
         text_color = 'color_button'
Line 462: Line 462:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<layout_info resolution = 'y>399'>
<layout_info resolution = 'y>399'>
     ...
     ...
Line 486: Line 486:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<globals>
<globals>
     ...
     ...
Line 507: Line 507:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<def var = 'WidgetSize' value = 'kBigWidgetSize' />
<def var = 'WidgetSize' value = 'kBigWidgetSize' />
<def resolution = 'y>399' var = 'WidgetSize' value = 'kNormalWidgetSize' />
<def resolution = 'y>399' var = 'WidgetSize' value = 'kNormalWidgetSize' />
Line 557: Line 557:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<widget name = 'SmallButton'
<widget name = 'SmallButton'
         size = '128, 18'
         size = '128, 18'
Line 567: Line 567:
A global widget definition is a parser-exclusive alias for the layout properties of a specific widget. For instance, the definition of a global widget named <tt>Slider</tt> with certain size properties will allow you to specify <tt>Slider</tt> as a Widget type when adding widgets to a Dialog, and that widget will inherit the size properties defined in this global definition. For more information, please check the documentation on <tt>&lt;widget&gt;</tt> (''local widget definition'').
A global widget definition is a parser-exclusive alias for the layout properties of a specific widget. For instance, the definition of a global widget named <tt>Slider</tt> with certain size properties will allow you to specify <tt>Slider</tt> as a Widget type when adding widgets to a Dialog, and that widget will inherit the size properties defined in this global definition. For more information, please check the documentation on <tt>&lt;widget&gt;</tt> (''local widget definition'').


<source lang="xml">
<syntaxhighlight lang="xml">
<dialog name = 'SampleDialog' overlays = 'screen'>
<dialog name = 'SampleDialog' overlays = 'screen'>
     <layout type = 'vertical' ...>
     <layout type = 'vertical' ...>
Line 612: Line 612:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<dialog name = 'Launcher' overlays = 'screen'>
<dialog name = 'Launcher' overlays = 'screen'>
     ...
     ...
Line 683: Line 683:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<layout type = 'vertical' center = 'true' padding = '23, 23, 8, 23'>
<layout type = 'vertical' center = 'true' padding = '23, 23, 8, 23'>
     ...
     ...
Line 717: Line 717:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<dialog name = 'GameOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GameOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'>
     <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
     <layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
Line 746: Line 746:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<widget name = 'StartButton' type = 'Button'/>
<widget name = 'StartButton' type = 'Button'/>
<space size = '16' />
<space size = '16' />
Line 760: Line 760:
Space keys may be optionally left without a <tt>size</tt> property: The space will automatically expand itself to fill all the remaining space inside the layout. This may be used to align widgets on the further side of a layout.
Space keys may be optionally left without a <tt>size</tt> property: The space will automatically expand itself to fill all the remaining space inside the layout. This may be used to align widgets on the further side of a layout.


<source lang="xml">
<syntaxhighlight lang="xml">
<layout type = 'horizontal' ...>
<layout type = 'horizontal' ...>
     /** Add a button on the left */
     /** Add a button on the left */
Line 789: Line 789:
===== Example =====
===== Example =====


<source lang="xml">
<syntaxhighlight lang="xml">
<widget name = 'AddGameButton'  
<widget name = 'AddGameButton'  
         width = '95'
         width = '95'
TrustedUser
2,147

edits

Navigation menu