-
Notifications
You must be signed in to change notification settings - Fork 1
ScriptHubGui (v3)
The main container of your Gui, all Categories and Elements go under this
In Order to show the Gui, a ScriptGui will automatically create a new Category that matches the name of the ScriptGui and cannot be changed
type | name | description |
---|---|---|
{Category} |
Categories | List of Categories in that are displayed under this ScriptGui |
number |
LayoutOrder | The order the ScriptGui is displayed in, if its parent's SortOrder is LayoutOrder |
Category |
MainCategory | A Category that matches the name of the ScriptGui and cannot be changed |
string |
Name | The text displayed on the left side of the Element |
ScriptGui, Category, ListElement |
Parent | The ScriptGui, Category, or ListElement the Element will be displayed under |
SortOrder |
SortOrder | Determines how the Category will sort its Categories |
return type | name | description |
---|---|---|
void |
Destroy | Removes the ScriptGui and calls Destroy on all Categories under it |
The container of your Elements
type | name | description |
---|---|---|
{Element} |
Elements | List of Elements that are displayed under the Category |
number |
LayoutOrder | The order the Category is displayed in, if its parent ScriptGui's SortOrder is LayoutOrder |
string |
Name | The text displayed on the left side of the Element |
ScriptGui |
Parent | The ScriptGui the Category will be displayed under |
SortOrder |
SortOrder | Determines how the Category will sort its Elements |
return type | name | description |
---|---|---|
void |
Destroy | Removes the Category and calls Destroy on all Elements under it |
The base Element class. Elements can be parented under ScriptGuis (will be parented to its MainCategory), Categories, and ListElements as they all have an ElementContainer
type | name | description |
---|---|---|
number |
LayoutOrder | The order the Element is displayed in, if its parent's SortOrder is LayoutOrder |
ScriptGui, Category, ListElement |
Parent | The ScriptGui, Category, or ListElement the Element will be displayed under |
string |
Name | The text displayed on the left side of the Element |
return type | name | description |
---|---|---|
void |
Destroy | Removes the Element |
An Element that the user can click on to switch between true and false.
type | name | description |
---|---|---|
boolean |
Value | current value of the BooleanElement |
return value | name | description |
---|---|---|
void |
Destroy | Removes the BooleanElement from its parent |
fire value type | name | description |
---|---|---|
boolean |
ValueChanged | fires when the Value changes, passing the new value |
An element that lets the user type in the TextBox
type | name | description |
---|---|---|
string |
Value | current value of the StringElement |
string |
PlaceholderText | Text to display when the TextBox is empty |
return value | name | description |
---|---|---|
void |
Destroy | Removes the StringElement from its parent |
fire value type | name | description |
---|---|---|
boolean |
ValueChanged | fires when the FocusLost fires on the TextBox, changing the value |
Similarly to StringElement, this lets the user type in a TextBox, but only allows for numbers to be inputed
type | name | description |
---|---|---|
number |
Value | current value of the NumberElement |
string |
PlaceholderText | Text to display when the TextBox is empty |
return value | name | description |
---|---|---|
void |
Destroy | Removes the NumberElement from its parent |
fire value type | name | description |
---|---|---|
number |
ValueChanged | fires when the FocusLost fires on the TextBox, checking if the value is a number and changing it |
When clicked, the user is prompted to press any key on their keyboard. Once the user does, the interaction ends and displays the key the user set
type | name | description |
---|---|---|
KeyCode |
Value | current value of the KeybindElement |
return value | name | description |
---|---|---|
void |
Destroy | Removes the KeybindElement from its parent |
fire value type | name | description |
---|---|---|
void |
SelectionEnded | fires when the user clicks the button, beginning key selection |
void |
SelectionStarted | fires when the user presses a key on their keyboard after clicking the button to select a key |
KeyCode |
ValueChanged | fires when the interaction finishes, passing the new value |
It's just a button. It can display text if specified.
type | name | description |
---|---|---|
string |
Text | Text to be displayed on the ButtonElement |
return value | name | description |
---|---|---|
void |
Destroy | Removes the ButtonElement from its parent |
fire value type | name | description |
---|---|---|
void |
OnClick | fires when the user clicks the button |
A special Element does not hold a Value but instead contains other Elements. A ListElement can also contain another ListElement
type | name | description |
---|---|---|
{Element} |
Elements | Elements that are displayed under the ListElement |
SortOrder |
SortOrder | Determines how the ListElement will sort its Elements |
return value | name | description |
---|---|---|
void |
Destroy | Removes the ListElement from its parent and calls Destroy on all Elements under it |
fire value type | name | description |
---|