diff --git a/public/js/Button.js b/public/js/Button.js index 306e6bd..72182d1 100644 --- a/public/js/Button.js +++ b/public/js/Button.js @@ -9,7 +9,7 @@ function Button(default_color, hover_color, select_color, width, height, x, y, t this.text = text; this.status = status; this.button_is_answer = button_is_answer; - this.click = click; + this.pointerdown = click; this.selected = false; let _this = this; @@ -55,7 +55,7 @@ function Button(default_color, hover_color, select_color, width, height, x, y, t this.graphics.interactive = true; this.graphics.buttonMode = true; this.graphics.defaultCursor = 'pointer'; - this.graphics.on('click', function () { + this.graphics.on('pointerdown', function () { if (_this.button_is_answer) { if (_this.selected === true) { _this.unSelectButton(); diff --git a/public/js/game.js b/public/js/game.js index dfc5076..894d500 100644 --- a/public/js/game.js +++ b/public/js/game.js @@ -126,7 +126,7 @@ function start_game() { dice.interactive = true; dice.buttonMode = true; dice.defaultCursor = 'pointer'; - dice.on('click', function () { + dice.on('pointerdown', function () { if (!diced) { socket.emit('roll dice'); } @@ -178,7 +178,7 @@ function generate_card_stack(sprite, x, y, onclick) { sprite.interactive = true; sprite.buttonMode = true; sprite.defaultCursor = 'pointer'; - sprite.on('click', onclick); + sprite.on('pointerdown', onclick); return sprite; }