From 583c5f56b606301f7e3420c73da4fd48c350c2d5 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Tue, 14 May 2024 17:18:46 +0200 Subject: [PATCH 1/2] wip --- components/PlayerSlot.vue | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/components/PlayerSlot.vue b/components/PlayerSlot.vue index 91dc712..da09108 100644 --- a/components/PlayerSlot.vue +++ b/components/PlayerSlot.vue @@ -64,6 +64,7 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe stack = +
run_effect(CardEffects.PREPARE, targe justify-content: start; } +.discard.unwrapped { + z-index: 9; + +} + + +#discard_unwrapped_bg { + display: none; + position: absolute; + left: 0; + top: 0; + height: 100%; + width: 100%; + z-index: 8; + background: rgba(0, 0, 0, 0.5) +} + +#discard_unwrapped_bg.unwrapped { + display: block; +} + .player { + position: relative; + isolation: isolate; display: grid; grid-template-columns: min-content 1fr; grid-template-rows: min-content min-content 1fr; From 2cec8bf54c0a5961b92b0c5ed97135b9c8479f04 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Tue, 14 May 2024 20:17:30 +0200 Subject: [PATCH 2/2] Feat : better discard Closes #27 --- components/GameBoard.vue | 5 ++-- components/PlayerSlot.vue | 56 +++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/components/GameBoard.vue b/components/GameBoard.vue index c4fe691..4858cd1 100644 --- a/components/GameBoard.vue +++ b/components/GameBoard.vue @@ -17,8 +17,7 @@ const discard_unwrapped = ref(false)
- - +
@@ -38,6 +37,8 @@ const discard_unwrapped = ref(false) #player_list, #current_player { overflow: auto; + position: relative; + isolation: isolate; } #market { diff --git a/components/PlayerSlot.vue b/components/PlayerSlot.vue index da09108..3ba31a3 100644 --- a/components/PlayerSlot.vue +++ b/components/PlayerSlot.vue @@ -17,14 +17,13 @@ import { CardEffects, type Effect } from "@/netcode/Effect"; export interface Props { player: Player; hide_stack_and_discard?: boolean; - discard_unwrapped?: boolean; } const props = withDefaults(defineProps(), { hide_stack_and_discard: () => false, - discard_unwrapped: () => false, }) +const discard_unwrapped = ref(false) const isPlayerTurn = computed(() => props.player.team === goStore.current_game?.current_turn); const isSelf = computed(() => props.player.uuid === goStore.self?.uuid); const isSelfTurn = computed(() => goStore.self?.team === goStore.current_game?.current_turn) @@ -64,27 +63,32 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe stack = -
+
- - - -
@@ -192,13 +196,21 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe margin-top: 50px; grid-area: discard; justify-content: start; + cursor: pointer; + pointer-events: none; } .discard.unwrapped { z-index: 9; - + cursor: default; + position: absolute; } +.discard_container { + display: flex; + /* background: blue; */ + pointer-events: all; +} #discard_unwrapped_bg { display: none; @@ -216,8 +228,6 @@ const prepare_champion = (target: Card) => run_effect(CardEffects.PREPARE, targe } .player { - position: relative; - isolation: isolate; display: grid; grid-template-columns: min-content 1fr; grid-template-rows: min-content min-content 1fr;