feat(wip): button to switch assets
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user