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
+4 -1
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { getCardsType } from '~/helpers/settingsCookies';
import goStore from '~/netcode';
export interface Props {
@@ -7,6 +8,8 @@ export interface Props {
const props = defineProps<Props>()
const cardsType = ref(getCardsType().value)
const card: Ref<Element | null> = ref(null)
const x = computed(() => {
@@ -32,7 +35,7 @@ const y = computed(() => {
<template>
<div :class="`card_overlay`" :style="`top: ${y}px; left: ${x}px`" ref="card">
<img :class="`card_image`" v-if="props.card_id"
:src="'/cards/' + props.card_id.toString().padStart(3, '0') + '.png'" draggable="false">
:src="`/cards/${cardsType}/` + 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"> -->
</div>