Clone wiki

FlowGUI / Checkbox

Description

A checkbox is like a button but it is either checked or unchecked.

Functions

  • FG_Checkbox:Create() --Creates a new checkbox
  • SetChecked(bool checked) --Sets the checked value for the checkbox. NOTE!: this does not fire the SetCheckedEvent() or SetUnCheckedEvent(). Use this function when you want to load user settings or when you are setting up the checkbox for the first time.
  • GetChecked() --Returns a boolean on whether the checkbox is checked.
  • SetMouseHoverEvent(function event) --Stores the function that needs to be executed when the mouse hovers the rectangle of the GUI element.
  • SetMouseDownEvent(function event) --Stores the function that needs to be executed when the mouse hovers and the left mouse button is held down on the rectangle of the GUI element.
  • SetMouseHitEvent(function event) --Stores the function that needs to be executed when the mouse hovers and the left mouse button is hit once on the rectangle of the GUI element.
  • SetCheckedEvent(function event) -- Stores the function that needs to be executed when the mouse hovers over the rectangle of the GUI element, the mouse is hit once and the checkbox has been set to 'checked'.
  • SetUnCheckedEvent(function event) -- Stores the function that needs to be executed when the mouse hovers over the rectangle of the GUI element, the mouse is hit once and the checkbox has been set to 'unhecked'.

Updated