mirror of
https://github.com/thepaperpilot/Super-Auto-Coots.git
synced 2024-11-25 18:00:20 +00:00
Add tooltips to characters
This commit is contained in:
parent
31ceb4d097
commit
4619a39706
1 changed files with 18 additions and 5 deletions
|
@ -1,11 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="character" :class="{ selected }">
|
<Tooltip
|
||||||
|
:display="character ? characters[character.type].nickname : ''"
|
||||||
|
:direction="Direction.Up"
|
||||||
|
>
|
||||||
|
<div class="character" :class="{ selected, empty: character == null }">
|
||||||
<span class="character-display">{{ character?.type }}</span>
|
<span class="character-display">{{ character?.type }}</span>
|
||||||
</div>
|
</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 {
|
||||||
|
|
Loading…
Reference in a new issue