EDM GUI widget reference


Default Properties

For all widgets

on_mouse_down (string)   default = (empty string)
String which is executed when a button is pressed. $arg1=x $arg2=y $arg3=button

on_mouse_up (string)   default = (empty string)
String which is executed when a button is released. $arg1=x $arg2=y $arg3=button

on_mouse_move (string)   default = (empty string)
String which is executed when the mouse is moved over the window. $arg1=x $arg2=y $arg3=button

on_mouse_in (string)   default = (empty string)
String which is executed when the mouse has moved into the window. $arg1=x $arg2=y $arg3=button

on_mouse_out (string)   default = (empty string)
String which is executed when the mouse has moved out of the window. $arg1=x $arg2=y $arg3=button

on_show (string)   default = (empty string)
String which is executed before the widget is shown.

x (int)   default = 0
Horizontal position

y (int)   default = 0
Vertical position

width (int)   default = 0
Width of the widget.

height (int)   default = 0
Height of the widget.

alignment (string)   default = (empty string)
Alignment of the widget. Combinations of: left, right, top, bottom, hcenter, vcenter, rel_width, rel_height, rel_x, rel_y (default top left)

visible (int)   default = 1
Whether the widget is visible or not.

sticky (int)   default = 0
Always show the widget, even if the GUI is off.

frametype (int)   default = 1
Type of frame and title bar. (currently 0=none, 1=normal titlebar, 2=frame only)

color (int)   default = 0
Color of the widget


label
A label displaying some text. Auto-scales its width to the text.

Properties:
text (string)   default = "Label"
The label caption


pixmap
Display any image file which can be loaded via SDL_image (jpg, png, etc)

Properties:
filename (string)   default = (empty string)
The name of the image file to display.

blendfunc (int)   default = 0
OpenGL Blending mode (0=alpha 1=additive)

scaling_x (int)   default = 0
X Scaling: 1000 = 100% relative to on-screen size. 0 = off (relative to widget size)

scaling_y (int)   default = 0
Y Scaling: 1000 = 100% relative to on-screen size. 0 = off (relative to widget size)


slider
A 1D Slider control

Properties:
on_change (string)   default = (empty string)
String which is executed when the slider changed. $arg1=new slider value.

value (int)   default = 12
The current slider value.

min (int)   default = 0
Minimum slider value

max (int)   default = 100
Maximum slider value

bgpixmap (string)   default = (empty string)
Filename of background image, or empty string for none.

vertical (int)   default = 0
Slider moves vertically if non-zero, else horizontally.

knobsize (int)   default = 12
Size of the slider knob in pixels.


md2model
Display an MD2 3D Model in the GUI. (btw: this and the pixmap are currently the only Flex/EDM widgets that do their painting themselves. All others only create objects which are automatically painted by Flex.)

Properties:
filename (string)   default = (empty string)
Model Path relative to the models directory, without the md2 filename. E. g. "monster/ogro" displays the Ogro model.


dropdown
A dropdown list with items which the user can select

Properties:
add_item (string)   default = (empty string)
Append an item at the end of the list. First word of item text is displayed in the list, the other words are passed as arguments to "on_change".

clear_items (int)   default = 0
Set this to any value to clear all list items.

on_change (string)   default = (empty string)
String which is executed when an item is selected. $arg1=first word of item text, $arg2=second word, etc.

select_by_index (int)   default = 0
Select an item by number

select_by_name (string)   default = (empty string)
Select an item by name


checkbox
A checkbox

Properties:
text (string)   default = "Checkbox"
Text to display

on_change (string)   default = (empty string)
String which is executed when clicked. $arg1=state (1=checked, 0=unchecked)

checked (int)   default = 0
Whether it is checked


colorwheel
Color Selector (Hue/Saturation/Value)

Properties:
hue (int)   default = 0
Hue of current color (0..3600)

sat (int)   default = 0
Saturation of current color (0..1000)

val (int)   default = 1000
Value of current color (0..1000)

red (int)   default = 255
0..255

green (int)   default = 0
0..255

blue (int)   default = 0
0..255

on_change (string)   default = (empty string)
String which is executed when the color changes


raisedframe0
Slightly raised widget frame

Properties:

raisedframe1
Raised widget frame used for Buttons

Properties:

raisedframe2
Raised frame used for toplevel windows

Properties:

loweredframe0
Slightly lowered widget frame

Properties:

loweredframe1
Lowered widget frame (variation 1)

Properties:

loweredframe2
Lowered widget frame (variation 2)

Properties:

beveledframe0
Raised and lowered frame combined

Properties:

button
Standard Button.

Properties:
text (string)   default = "Button"
Button Caption

on_click (string)   default = (empty string)
String which is executed when the button is clicked. $arg1=which mouse button


rect
A basic rectangle which can be used to group other widgets.

Properties:

panes
Two panes with a handle in between which can be dragged. Create 2 child widgets (e. g. rects) to be used as first and second pane.

Properties:
vertical (int)   default = 0
Handle moves vertically if non-zero, else horizontally.

position (int)   default = 20
Size of the first pane in pixels.


textinput
A box where the user can key in text.

Properties:
text (string)   default = (empty string)
Current text

console (int)   default = 0
Whether it acts like a console input, with tab completion etc.

on_gainfocus (string)   default = (empty string)
String which is executed when the widget gets the keyboard focus

on_losefocus (string)   default = (empty string)
String which is executed when the widget loses the keyboard focus

on_change (string)   default = (empty string)
String which is executed whenever the input's text changes

on_enter (string)   default = (empty string)
String which is executed when the enter key is pressed

haskeyboardfocus (int)   default = 0
Set or query whether the widget has the keyboard focus.


profiledisplay


Properties:

multiline
A multiline text display with line wrap

Properties:
text (string)   default = (empty string)
Current text


textinputtest (user dialog)


Properties:
dialog_title (string)   default = "textinputtest"
The dialog's caption

dialog_width (int)   default = 150
The dialog's default width

dialog_height (int)   default = 64
The dialog's default height


varcheckbox (user widget)
A check box that is tied to a game variable. Automatically loads its checked state when shown and toggles the variable when clicked.

Properties:
var (string)   default = "novar"
Name of the variable to toggle

text (string)   default = "notext"
Text to display


Select a Team (user dialog)


Properties:
dialog_title (string)   default = "Select a Team"
The dialog's caption

dialog_width (int)   default = 300
The dialog's default width

dialog_height (int)   default = 80
The dialog's default height

gui_wasvis (int)   default = 0



New Sticky Note (user dialog)


Properties:
dialog_title (string)   default = "New Sticky Note"
The dialog's caption

dialog_width (int)   default = 200
The dialog's default width

dialog_height (int)   default = 32
The dialog's default height

wasvis (int)   default = 0



Input (user dialog)


Properties:
dialog_title (string)   default = "Input"
The dialog's caption

dialog_width (int)   default = 230
The dialog's default width

dialog_height (int)   default = 32
The dialog's default height

desc (string)   default = (empty string)


text (string)   default = (empty string)



System Request (user dialog)
A Message Box with an OK button

Properties:
dialog_title (string)   default = "System Request"
The dialog's caption

dialog_width (int)   default = 250
The dialog's default width

dialog_height (int)   default = 130
The dialog's default height

guiwasactive (int)   default = 0



Graphics Settings (user dialog)
Set Screen Resolution and GFX options

Properties:
dialog_title (string)   default = "Graphics Settings"
The dialog's caption

dialog_width (int)   default = 300
The dialog's default width

dialog_height (int)   default = 150
The dialog's default height


Sound Settings (user dialog)
Set sound options.

Properties:
dialog_title (string)   default = "Sound Settings"
The dialog's caption

dialog_width (int)   default = 300
The dialog's default width

dialog_height (int)   default = 200
The dialog's default height


Input Settings (user dialog)
Set Mouse Input options, etc.

Properties:
dialog_title (string)   default = "Input Settings"
The dialog's caption

dialog_width (int)   default = 300
The dialog's default width

dialog_height (int)   default = 130
The dialog's default height


Player Setup (user dialog)
Select player model and team

Properties:
dialog_title (string)   default = "Player Setup"
The dialog's caption

dialog_width (int)   default = 450
The dialog's default width

dialog_height (int)   default = 260
The dialog's default height


Lighting (user dialog)
Options used with relighting

Properties:
dialog_title (string)   default = "Lighting"
The dialog's caption

dialog_width (int)   default = 320
The dialog's default width

dialog_height (int)   default = 200
The dialog's default height


Profiling Stats (user dialog)


Properties:
dialog_title (string)   default = "Profiling Stats"
The dialog's caption

dialog_width (int)   default = 400
The dialog's default width

dialog_height (int)   default = 185
The dialog's default height


sidebarsketch (user dialog)


Properties:
dialog_title (string)   default = "sidebarsketch"
The dialog's caption

dialog_width (int)   default = 100
The dialog's default width

dialog_height (int)   default = 0
The dialog's default height


mapvote (user dialog)


Properties:
dialog_title (string)   default = "mapvote"
The dialog's caption

dialog_width (int)   default = 300
The dialog's default width

dialog_height (int)   default = 64
The dialog's default height


Quick Help (user dialog)


Properties:
dialog_title (string)   default = "Quick Help"
The dialog's caption

dialog_width (int)   default = 620
The dialog's default width

dialog_height (int)   default = 365
The dialog's default height