bw logo

Chapter 17. .gui

Used to persist GUI hierarchies, these files are located under fantasydemo/res/gui.

For a detailed description of each section (GUI class) and tag (GUI member), see the Client Python API's entry Modules GUI.

The grammar of <gui>.gui files is listed below:

<file_name>

  *<SimpleGUIComponent>  integer
       SimpleGUIComponentSection
    </SimpleGUIComponent>

  *<GoboComponent>  integer
       SimpleGUIComponentSection
   </GoboComponent>

  *<FrameGUIComponent>  integer
       SimpleGUIComponentSection
       <edgeTextureName>    folder/file  </edgeTextureName>
       <cornerTextureName>  folder/file  </cornerTextureName>
   </FrameGUIComponent>

  *<WindowGUIComponent>  integer
       SimpleGUIComponentSection
       <scroll>     integer  </scroll>
       <minScroll>  integer  </minScroll>
       <maxScroll>  integer  </maxScroll>
   </WindowGUIComponent>

  *<GraphGUIComponent>  integer
       SimpleGUIComponentSection
       <nPoints>    integer  </nPoints>
       <minY>       float    </minY>
       <maxY>       float    </maxY>
       <frequency>  float    </frequency>
   </GraphGUIComponent>

  *<TextGUIComponent>  integer
       SimpleGUIComponentSection
       <label>         string      </label>
       <font>          file1        </font>
       <pixelSnap>     true|false  </pixelSnap>
       <explicitSize>  true|false  </explicitSize>
   </TextGUIComponent>

  *<BoundingBoxGUIComponent>  integer
       SimpleGUIComponentSection
      ?<clipSpaceSource>        true|false         </clipSpaceSource>
      ?<clipToBox>              true|false         </clipToBox>
      ?<absoluteSubspace>       integer            </absoluteSubspace>
      ?<offsetSubspace>         float float float  </offsetSubspace>
      ?<alwaysDisplayChildren>  true|false         </alwaysDisplayChildren>
   </BoundingBoxGUIComponent>

  *<ConsoleGUIComponent>  integer
       SimpleGUIComponentSection
       <scale>  float  </scale>
       <lines>
         *<colour>  float float float float  </colour>
         *<line>    string                   </line>
       </lines>
   </ConsoleGUIComponent>

  *<AlphaGUIShader>  integer
       <mode>   integer  </mode>
       <stop>   float    </stop>
       <start>  float    </start>
       <alpha>  float    </alpha>
       <speed>  float    </speed>
   </AlphaGUIShader>

  *<ClipGUIShader>  integer
       <mode>   integer  </mode>
       <value>  float    </value>
       <speed>  float    </speed>
       <delay>  float    </delay>
       <slant>  float    </slant>
   </ClipGUIShader>

  *<ColourGUIShader>  integer
       <start>   float float float float  </start>
       <middle>  float float float float  </middle>
       <end>     float float float float  </end>
       <value>   float                    </value>
       <speed>   float                    </speed>
   </ColourGUIShader>
      
  *<MatrixGUIShader>  integer
      ?<target>
          <row0>  float float float  </row0>
          <row1>  float float float  </row1>
          <row2>  float float float  </row2>
          <row3>  float float float  </row3>
       </target>
      ?<eta>    float       </eta> 
      ?<blend>  true|false  </blend>
   </MatrixGUIShader>

</file_name>

Grammar of fantasydemo/res/gui/<gui>.gui

1

For details on grammar of font files, see .font.

The list below describes the tags in file <gui>.gui:

  • AlphaGUIShader, BoundingBoxGUIComponent, ClipGUIShader, ColourGUIShader, ConsoleGUIComponent, FrameGUIComponent, GoboComponent, GraphGUIComponent, MatrixGUIShader, SimpleGUIComponent, TextGUIComponent, WindowGUIComponent

    Creates an object of the specified type.

    For details on GUI components, see the document Client Programming Guide's section Graphical User Interface (GUI) C++ GUI support.

17.1. SimpleGUIComponentSection

The grammar for the SimpleGUIComponentSection is described below:

 <position>          float float float        </position>
 <widthInClip>       true|false               </widthInClip> 
 <width>             float                    </width>
 <heightInClip>      true|false               </heightInClip>
 <height>            float                    </height>
 <colour>            float float float float  </colour>
 <angle>             integer                  </angle>
 <flip>              integer                  </flip>
 <visible>           true|false               </visible>
 <horizontalAnchor>  integer                  </horizontalAnchor>
 <verticalAnchor>    integer                  </verticalAnchor>
 <textureName>       folder/file              </textureName>
 <materialFX>        integer                  </materialFX>
 <filterType>        integer                  </filterType>
 <tiled>             true|false               </tiled>
 <tileWidth>         integer                  </tileWidth>
 <tileHeight>        integer                  </tileHeight>
 <script>            string                   </script>
?<children>
   +<attribute>  integer  </attribute>
 </children>
?<shaders>
   +<attribute>  integer  </attribute>
 </shaders>

Grammar of <gui>.gui's SimpleGUIComponentSection

For details on each of the tags, see the Client Python API, entry Modules GUI.