GUI Documentation


This is the editor that allows you to create GUIs for the game. Right click the on the window to bring up the Menu Properties dialog. Here’s a description of the fields:

  • Menu Name
    The name of the menu that you will reference it by in the game.

  • Motion Direction
    This is the direction that the menu will appear from when toggled in the game. Choices are:

    • NONE (Default)
    • FROM_TOP

  • Time
    This is the amount of time the menu takes to appear or disappear when toggled.

  • General Commands
    You can add any of the appropriate layout commands mentioned below.

Creating A Widget

To create a widget, just click the LMB anywhere in the background and drag out a region. This will define the frame of the widget. Double click in the frame of that widget to bring up the Widget Properties Dialog. Here’s a description of the fields:

  • Name
    Internal name of the widget. This really isn’t used much in the game and was added (just in case we need it).

  • Class
    Defines the class of the widget (Button, Label, List, etc…).

  • Title
    Title to be displayed for labels, buttons, etc..

  • Cmd
    Stuff command to be put into the command buffer when the widget is activated (i.e. button is pressed).

  • Cvar
    Name of the cvar to link this widget with. If the value of the widget changes, then this cvar will be updated with the appropriate value.

  • Border
    Style of the border of the widget.

  • BGColor
    Background color of the widget.

  • BGAlpha
    Background alpha of the widget.

  • FGColor
    Foreground color of the widget.

  • FGAlpha
    Foreground alpha of the widget.

  • Position
    Position of the widget ( x,y,width,height).

  • Class specific attributes
    Extra information that applies to the widget. See the list of layout commands below.

Layout commands

  • align <left> <right> <top> <bottom>
    Aligns the widget to the specified directions (resolution independent)

  • shader <shadername>
    Sets the shader of the widget. This will be drawn stretched in the widget

  • tileshader <shadername>
    Sets the shader of the widget. This will be drawn tiled in the widget

  • hovershader <shadername>
    Sets the shader that will be drawn when the mouse is hovering over the widget

  • additem <item>
    Adds the specified item to a list or listbox widget

  • setrange <min> <max>
    Sets the range of the slider from min to max

  • direction <from_left | from_right | from_top | from_bottom>
    Sets the direction of the shader when it appears on the screen. It will scroll in from that direction over time

  • slidertype <integer | float>
    Sets the type of the slider to either integral or floating value

  • fadein <time>
    Makes the widget fade in over the specified time

  • stopsound <soundname>
    Plays the sound specified when the widget stops moving

  • clicksound <soundname>
    Plays the sound specified when the widget is clicked

  • stretch < horizontal | vertical >
    Stretch the widget horizontally or vertically across the whole screen (resolution independent )

  • initdata <data>
    Initializes the widget to data (used for sliders)

  • sliderstep <stepsize>
    Sets the stepsize for the slider