Interface ButtonOptions

Button component configuration

const button = new Button({
shape: ButtonShape.Rectangle,
width: 100,
height: 50,
offset: new Vector2(0, 0),
touchEnabled: true,
onClick: () => console.log("Button clicked!"),
onPressed: () => console.log("Button pressed!")
});
interface ButtonOptions {
    height: number;
    offset: Vector2;
    onClick: (() => void);
    onPressed: (() => void);
    radius: number;
    shape: ButtonShape;
    touchEnabled: boolean;
    width: number;
}

Properties

height: number
offset: Vector2
onClick: (() => void)
onPressed: (() => void)
radius: number
touchEnabled: boolean
width: number