Button
A Generic FBase Button class. Can be called as a function to create a new button. This class uses a custom method for detecting mouse hovering and clicking. As a result it will not work when the Gui is within a PluginGui.
local Button = require(FusionOnRails.Classes.Buttons.Button)
local myButton = Button {
ClassName = "TextButton",
Properties = {
BackgroundColor3 = Color3.fromRGB(255, 255, 255),
Text = "Click Me!",
},
}
Properties
Activated
Button.Activated:
Signal
Held
Button.Held:
Value
<
boolean
>
Hovering
Button.Hovering:
Value
<
boolean
>
Disabled
Button.Disabled:
Value
<
boolean
>
ClassName
StaticButton.ClassName:
"Button"
The ClassName of the Button.
Functions
new
StaticButton.
new
(
props:
{
ClassName:
string?
,
Held:
Value
<
boolean
>
?
,
Hovering:
Value
<
boolean
>
?
,
Disabled:
CanBeState
<
boolean
>
?
,
GamepadKeyCode:
CanBeState
<
Enum.KeyCode
>
?
,
ActivatedSoundId:
CanBeState
<
string
>
?
,
ActivatedSoundVolume:
CanBeState
<
number
>
?
,
Activated:
CanBeState
<
Fn?
>
?
,
Children:
PubTypes.Children?
,
-
-
[
Fusion.Children
]
:
PubTypes.Children?
,
-
-
also
supports
Fusion.Children
Properties:
{
[
any
]
:
any
}
?
,
[
any
]
:
any?
,
}
) →
Button
Creates a new FBase Button.
Textbutton specific properties need to be set in a given Properties
table.
Activate
Button:
Activate
(
...:
any
) →
(
)
Simulates a MouseClick on the button