Skip to content

Button ​

UIScripts: ButtonComponent

From a script ​

ts
import { ButtonComponent } from "mmpx";

const button = this.entity.TryGetComponent(ButtonComponent);

Full API: ButtonComponent.

Fields ​

FieldTypeDefaultDescription
Interactable
interactable
booleantrue
Transition
transition
"none" | "color" | "sprite" | "scale""scale"
Duration
duration
number (0 … ∞) (s)0.1

Colors ​

FieldTypeDefaultDescription
Normal
normalColor
colour#FFFFFF
Hover
hoverColor
colour#E0E0E0
Pressed
pressedColor
colour#B0B0B0
Disabled
disabledColor
colour#707070

Sprites ​

FieldTypeDefaultDescription
Normal
normalSprite
texture asset—
Hover
hoverSprite
texture asset—
Pressed
pressedSprite
texture asset—
Disabled
disabledSprite
texture asset—

Scales ​

FieldTypeDefaultDescription
Normal
normalScale
number (0 … ∞)1
Hover
hoverScale
number (0 … ∞)1.05
Pressed
pressedScale
number (0 … ∞)0.95

© 2026 PlayAdGentic