From bde5dc98ad96546b59e91f5a6e552bf80cbf48e4 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 24 Aug 2023 14:42:12 +0200 Subject: translations and error handling --- resources/js/game.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'resources/js/game.js') diff --git a/resources/js/game.js b/resources/js/game.js index 663e6b0..0ba5a8d 100644 --- a/resources/js/game.js +++ b/resources/js/game.js @@ -954,7 +954,7 @@ const Game = { }; // Game click bindings -UI.elements.nextTrainer.addEventListener('click', Game.encounterTrainer); -UI.elements.battleOpponent.addEventListener('click', Game.battleClick); -UI.elements.techniques.addEventListener('click', Game.techniqueClick); -UI.elements.menuCatch.addEventListener('click', Game.catchMonster); +UI.elements.nextTrainer.addEventListener('click', UI.createEventListener(Game.encounterTrainer)); +UI.elements.battleOpponent.addEventListener('click', UI.createEventListener(Game.battleClick)); +UI.elements.techniques.addEventListener('click', UI.createEventListener(Game.techniqueClick)); +UI.elements.menuCatch.addEventListener('click', UI.createEventListener(Game.catchMonster)); -- cgit v1.2.3