Profectus-Niffix/src/App.vue

49 lines
1.3 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="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 } from "vue";
import Game from "./components/system/Game.vue";
import GameOverScreen from "./components/system/GameOverScreen.vue";
import NaNScreen from "./components/system/NaNScreen.vue";
2022-01-25 04:23:30 +00:00
import Nav from "./components/system/Nav.vue";
2022-01-14 04:25:47 +00:00
import TPS from "./components/system/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>