PIXI Controls: Round hitArea for A/B/X/Y

This commit is contained in:
OleSTEEP 2024-02-09 00:58:52 +03:00
parent 85399acc67
commit 6eb3bed55a
2 changed files with 2 additions and 0 deletions

View file

@ -61,6 +61,7 @@ ONSControls.createButtons = function() {
.on("pointerup", (event) => {this.sendEvent(event, "BUTTON_Y")});
for (btn of buttons) {
btn.anchor.set(0.5);
btn.hitArea = new PIXI.Circle(0, 0, 40);
container.addChild(btn);
}
this._controlsCanvas.stage.addChild(container);