GuiButton

Show Deprecated
Not Creatable
Not Browsable

GuiButton is an abstract class that inherits from GuiObject. It is the base class for the interactive, clickable ImageButton and TextButton objects. This class also defines several properties for interactive behavior, namely AutoButtonColor and Modal.

The most important event of a GuiButton is Activated, a multi-platform event that fires when the button is activated. When using a mouse, this means clicking the button and releasing with the cursor still over the UI object. For touch, the same applies but with a touch instead of button press. Finally, for gamepads, Activated fires if a GuiButton is selected when the A button is pressed and released. In short, this event is very useful for multi-platform user interface programming as it provides a nice general interface for a single user input.

Summary

Properties

Properties inherited from GuiObject

Properties

Properties inherited from GuiBase2d

Properties

Methods

Methods inherited from GuiObject

Methods

Events

Events inherited from GuiObject

Events

Events inherited from GuiBase2d

Events

Properties

AutoButtonColor

Read Parallel

HoverHapticEffect

Read Parallel
Read Parallel

PressHapticEffect

Read Parallel

Selected

Read Parallel
Read Parallel

Methods

Events

Activated

Parameters

inputObject: InputObject
clickCount: number

MouseButton1Click


MouseButton1Down

Parameters


MouseButton1Up

Parameters


MouseButton2Click


MouseButton2Down

Parameters


MouseButton2Up

Parameters