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!")}); Copy
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!")});
Button component configuration
Example