Add tooltips to characters

This commit is contained in:
thepaperpilot 2023-02-17 07:28:45 -06:00
parent 31ceb4d097
commit 4619a39706

View file

@ -1,11 +1,20 @@
<template> <template>
<div class="character" :class="{ selected }"> <Tooltip
<span class="character-display">{{ character?.type }}</span> :display="character ? characters[character.type].nickname : ''"
</div> :direction="Direction.Up"
>
<div class="character" :class="{ selected, empty: character == null }">
<span class="character-display">{{ character?.type }}</span>
</div>
</Tooltip>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const props = defineProps<{ import Tooltip from "features/tooltips/Tooltip.vue";
import { Direction } from "util/common";
import { characters } from "./projEntry";
defineProps<{
character?: { character?: {
type: string; type: string;
relevancy: number; relevancy: number;
@ -21,8 +30,12 @@ const props = defineProps<{
position: relative; position: relative;
margin: 50px; margin: 50px;
justify-content: center; justify-content: center;
cursor: pointer;
user-select: none; user-select: none;
display: flex;
}
.character:not(.empty) {
cursor: pointer;
} }
.character-display { .character-display {