feat(wip): button to switch assets

This commit is contained in:
2024-05-19 17:49:33 +02:00
parent 40d0c65eb1
commit 5cd57a7266
140 changed files with 366 additions and 2 deletions
+5 -1
View File
@@ -1,5 +1,7 @@
<script setup lang="ts">
import { getCardsType } from '~/helpers/settingsCookies';
import goStore from '~/netcode';
import { useSettingsStore } from '~/stores/settingsStore';
export interface Props {
card_id: number | undefined
@@ -16,6 +18,8 @@ const props = withDefaults(defineProps<Props>(), {
const emit = defineEmits(["click"])
const settingsStore = useSettingsStore()
const childCount = ref<number>(0)
function cardClick() {
@@ -48,7 +52,7 @@ watch(
<slot></slot>
</div>
<img :class="`card_image`" v-if="props.card_id"
:src="'/cards/' + props.card_id.toString().padStart(3, '0') + '.png'" draggable="false">
:src="`/cards/${settingsStore.cardStyle}/` + props.card_id.toString().padStart(3, '0') + '.png'" draggable="false">
<img :class="`card_image`" v-if="!props.card_id" :src="'/cards/background.png'" draggable="false">