Profectus-Niffix/src/App.vue

49 lines
1.2 KiB
Vue
Raw Normal View History

2021-05-19 22:21:51 +00:00
<template>
<div id="modal-root" :style="theme" />
<div class="app" @mousemove="updateMouse" :style="theme" :class="{ useHeader }">
<Nav v-if="useHeader" />
2022-01-14 04:25:47 +00:00
<Game />
<TPS v-if="unref(showTPS)" />
<GameOverScreen />
<NaNScreen />
</div>
2021-05-19 22:21:51 +00:00
</template>
2022-01-14 04:25:47 +00:00
<script setup lang="ts">
import { computed, toRef, unref } from "vue";
2022-02-27 22:04:56 +00:00
import Game from "./components/Game.vue";
import GameOverScreen from "./components/GameOverScreen.vue";
import NaNScreen from "./components/NaNScreen.vue";
import Nav from "./components/Nav.vue";
import TPS from "./components/TPS.vue";
import modInfo from "./data/modInfo.json";
import themes from "./data/themes";
import settings from "./game/settings";
import "./main.css";
2022-01-14 04:25:47 +00:00
function updateMouse(/* event */) {
// TODO use event to update mouse position for particles
}
const useHeader = modInfo.useHeader;
const theme = computed(() => themes[settings.theme].variables);
const showTPS = toRef(settings, "showTPS");
2021-05-19 22:21:51 +00:00
</script>
2021-06-12 04:38:16 +00:00
<style scoped>
2021-07-24 22:08:52 +00:00
.app {
background-color: var(--background);
2021-09-04 21:51:41 +00:00
color: var(--foreground);
display: flex;
flex-flow: column;
min-height: 100%;
height: 100%;
2021-07-24 22:08:52 +00:00
}
#modal-root {
position: absolute;
min-height: 100%;
height: 100%;
}
2021-05-19 22:21:51 +00:00
</style>