A clickable LUIElement that fires ElementClicked_${name} messages.

export class MyGUI extends Component {
@link("GraphicsEngine:typesprite")
private graphics:GraphicsEngine;

onInit() {
const ec = new LUIClickElement().setName("ExitSpace");
// ^^^^^^^^^
this.graphics.gui.addChild(ec);
}

onMessage_ElementClicked_ExitSpace() {
// ^^^^^^^^^
console.log("click-element was clicked! :-)");
}
}
  • NOTE, this uses the offset property the element by default.

⚠️ experimental

Hierarchy

Constructors

Properties

_isDown: boolean = false
clickOffset: number = 1
messageData: any

Methods

Generated using TypeDoc