-
Notifications
You must be signed in to change notification settings - Fork 49
SysGUI
Andrew Mac edited this page Mar 5, 2015
·
3 revisions
SysGUI is an easy to use GUI system built into Torque 6. Though it could be, it's not intended to be used in a final product. It's meant for use for editors, temporary GUI for testing, etc. Hence the name SysGUI (short for System GUI).
- beginScrollArea/endScrollArea : All elements created between begin/end will be contained in a scrollable area.
- label : Text label.
- list : List of selectable items.
- checkBox : A checkbox.
- slider : Numeric value slider, requires a minimum and maximum value.
- textInput : Text input box.
- button : Pressable button with label.
- separator : Visual separator for dividing up sections of elements.
SysGUI can be used from TorqueScript, main engine code, and from Plugins via PluginLink.SysGUI. Elements are created sequentially from to bottom so if you call checkBox followed by slider the checkBox display above the slider. Each element returns an ID number so it can be deleted or changed. SysGUI also has seek and clearSeek commands in case you need to add an element before/after an existing element. You need to only create elements once, they do not need to be called per-frame.
SysGUI::beginScrollArea("My first SysGUI Dialog!", 5, 5, 200, 200);
SysGUI::separator();
SysGUI::label("Hello World!");
SysGUI::checkBox("Checked!", true);
SysGUI::checkBox("Unchecked!", false);
SysGUI::button("Click Me.", "");
SysGUI::textInput("Put Text: ", "In Here!");
SysGUI::separator();
SysGUI::endScrollArea();
SysGUI::setEnabled(true);
Result: