Skip to content
OliverF edited this page Jun 12, 2014 · 18 revisions

Classes

Class Details
Button Click-able control
Chart Control for data visualization
Container A control required to display child controls
Control Base control class
Label Simple text control

GUI.Button

Click-able control. Fundamentally no different from a Label control, though is visually click-able.

Methods

Method Details
GetText Returns the text of the button
SetText Sets the text of the button

GUI.Chart

Chart control for data visualization.

Methods

Method Details
CreateSeries Create a new data series on the chart
SetAxesLimits Set static limits on the size of each axis
SetXY Set the XY data points for a given series

GUI.Container

Container control. The Container control can be moved and resized by the end-user, allowing a degree of customizability. The plugin guidelines state that all visual components must reside within a Container, and that all controls within the Container should be re-positioned when the Container is resized.

Events

Name Details
OnResize Triggered when the control is resized by the end-user. Should be used to trigger re-positioning of child controls to account for the change in size

GUI.Control

Base control class. All controls are derived from this class.

Fields

Type Field Details
string ControlID Custom unique ID specified at control creation
string ControlType Class name of control

Events

Name Details
OnMouseClick Triggered when the control is clicked on by the end-user
OnMouseEnter Triggered when the mouse is moved into the region of the control
OnMouseExit Triggered when the mouse is moved out of the region of the control

Functions

Function Details
__call Creates a new control

Methods

Method Details
GetLocation Returns the xy coordinates of the control
GetParent Returns the parent control
GetSize Returns the width and height of the control
Remove Removes the control from the parent
SetLocation Sets the location of the control in pixels relative to the parent
SetParent Parents this control to another control
SetSize Sets the size of the control in pixels

GUI.Label

Simple text control.

Methods

Method Details
GetText Returns the text of the label
SetAutoScale If set to true, the label's size will adjust automatically to fit the contents of the label
SetFont Sets the font of the label's text
SetFontSize Sets the font size of the label's text
SetText Sets the text of the label

Clone this wiki locally