From 06d403ebe353d8bc3f07d144e25fb3177897c8c1 Mon Sep 17 00:00:00 2001 From: Hanusiak Piotr Date: Wed, 26 Jan 2022 10:40:13 +0100 Subject: [PATCH] simplify actionsMenu --- .../Components/ActionsMenu/ActionsMenu.svelte | 50 ++++++++----------- front/src/Components/App.svelte | 5 +- front/src/Phaser/Entity/RemotePlayer.ts | 47 +++++++---------- front/src/Phaser/Game/GameScene.ts | 1 - front/src/Stores/ActionsMenuStore.ts | 39 +++++++++------ front/src/Stores/GameStore.ts | 4 -- 6 files changed, 67 insertions(+), 79 deletions(-) diff --git a/front/src/Components/ActionsMenu/ActionsMenu.svelte b/front/src/Components/ActionsMenu/ActionsMenu.svelte index 053502eb..632401e7 100644 --- a/front/src/Components/ActionsMenu/ActionsMenu.svelte +++ b/front/src/Components/ActionsMenu/ActionsMenu.svelte @@ -1,16 +1,13 @@ -
- -

{playerName}

-
- {#each [...possibleActions] as [key, menuAction]} - - {/each} +{#if actionsMenuData} +
+ +

{actionsMenuData.playerName}

+
+ {#each [...actionsMenuData.actions] as { actionName, callback }} + + {/each} +
-
+{/if}