impulseSwitch

A two-choice option button.

Functions

impulseSwitch:DoClick()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

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

impulseSwitch:GetOption1()

View source »

Gets the second option. Indexed at one because it's better.

Returns

impulseSwitch:GetSelection()

View source »

Gets the selection.

Returns

impulseSwitch:GetValue()

View source »

Gets the value.

Returns

  • number

    The value

impulseSwitch:Init()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Initializes the panel.

impulseSwitch:Paint(w, h)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

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()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Called every tick.

impulseSwitch:ToggleValue()

View source »

Toggles the value.