impulseSwitch
A two-choice option button.
Functions
impulseSwitch:DoClick()
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Called when the panel is clicked.
impulseSwitch:GetDisplayValue()
View source »Gets the display value.
Returns
-
number
The display value
impulseSwitch:GetOption0()
View source »Gets the first option. Indexed at zero because it's better.
Returns
-
string
The option
impulseSwitch:GetOption1()
View source »Gets the second option. Indexed at one because it's better.
Returns
-
string
The option
impulseSwitch:GetSelection()
View source »Gets the selection.
Returns
-
string
The option value.
impulseSwitch:GetValue()
View source »Gets the value.
Returns
-
number
The value
impulseSwitch:Init()
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Initializes the panel.
impulseSwitch:Paint(w, h)
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Paints the panel.
Parameters
-
w
int
The width of the panel.
-
h
int
The height of the panel.
impulseSwitch:SetDisplayValue(value)
View source »Sets the display value.
Parameters
-
value
number
The value to set
impulseSwitch:SetOption0(option)
View source »Sets the first option. Indexed at zero because it's better.
Parameters
-
option
string
The option to set
impulseSwitch:SetOption1(option)
View source »Sets the second option. Indexed at one because it's better.
Parameters
-
option
string
The option to set
impulseSwitch:SetSelection(value)
View source »Sets the selection based on a text input.
Parameters
-
value
string
The option value.
impulseSwitch:SetValue(value)
View source »Sets the value.
Parameters
-
value
number
The value to set
impulseSwitch:Think()
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Called every tick.
impulseSwitch:ToggleValue()
View source »Toggles the value.