-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix overflow in default and simulator shell
- Loading branch information
1 parent
95d5e6d
commit 3e85a86
Showing
10 changed files
with
109 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,91 @@ | ||
<script setup lang="ts"> | ||
import BS5Shell from "../components/bs5-shell.vue"; | ||
import BS5Shell from "./bs5.vue"; | ||
import BS5DebugOverlay from "../components/debug-overlay.vue"; | ||
import {useUIStore} from "../stores/ui.ts"; | ||
const uiStore = useUIStore(); | ||
</script> | ||
|
||
<template> | ||
<svg class="circle-svg"> | ||
<circle cx="1247" cy="487" r="240" fill="lightgray" /> | ||
<line x1="1017" y1="437" x2="1477" y2="437" stroke="gray" /> <!-- Adjusted this line --> | ||
<line x1="1017" y1="537" x2="1477" y2="537" stroke="gray" /> <!-- Adjusted this line --> | ||
</svg> | ||
<div style="z-index: 10000; position: fixed; top: 0%; right: 0%; "> | ||
<input type="number" v-model="uiStore.wheelPointerAngle" /> | ||
<input type="number" v-model="uiStore.volume" /> | ||
</div> | ||
<div | ||
style="z-index: 10000; position: fixed; top: 50%; right: 50px; "> | ||
<input style="transform: translateY(-50%) rotate(270deg);" type="range" min="150" max="210" step="0.001" v-model="uiStore.wheelPointerAngle" /> | ||
</div> | ||
<div | ||
style="z-index: 10000; position: fixed; top: 50%; right: 0px; "> | ||
<input style="transform: translateY(-50%) rotate(270deg);" type="range" min="0" max="100" step="1" v-model="uiStore.volume" /> | ||
</div> | ||
<img id="wheel" src="../assets/wheel.png"> | ||
<div class="controls"> | ||
<button class="middle-button"><</button> <!-- Add this line --> | ||
<button class="middle-button">></button> <!-- Add this line --> | ||
<button class="middle-button">GO</button> <!-- Add this line --> | ||
</div> | ||
<div class="debug-container"> | ||
<BS5DebugOverlay /> | ||
<BS5Shell /> | ||
<div id="simulator"> | ||
<div class="debug-container"> | ||
<BS5Shell /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.circle-svg { | ||
#wheel { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 2000; /* To ensure the circle is on top */ | ||
top: 238px; | ||
left: 1004px; | ||
width: 500px; | ||
height: 500px; | ||
z-index: 1000; | ||
} | ||
.controls { | ||
display: flex; | ||
justify-content: space-between; | ||
position: absolute; | ||
top: 452px; /* Position at the middle of the parent element */ | ||
left: 1047px; /* Position at the middle of the parent element */ | ||
width: 400px; /* Adjust as needed */ | ||
top: 469px; /* Position at the middle of the parent element */ | ||
left: 1057px; /* Position at the middle of the parent element */ | ||
width: 390px; /* Adjust as needed */ | ||
z-index: 2500; | ||
} | ||
.middle-button { | ||
flex: 1; /* This will make the buttons take up equal space */ | ||
margin: 10px; /* Add some space between the buttons */ | ||
height: 50px; | ||
margin: 2px; /* Add some space between the buttons */ | ||
height: 32px; | ||
background-color: black; | ||
color: white; | ||
border: none; | ||
cursor: pointer; | ||
} | ||
.middle-button:active { | ||
animation: flashGray 300ms; | ||
} | ||
@keyframes flashGray { | ||
0% { background-color: black; } | ||
50% { background-color: #333; } | ||
100% { background-color: black; } | ||
} | ||
.debug-container { | ||
border: 80px black solid; | ||
border-radius: 5px; | ||
width: 1024px; /* Adjust as needed */ | ||
height: 768px; /* Adjust as needed */ | ||
position: absolute; /* or relative, depending on your needs */ | ||
overflow: hidden; | ||
} | ||
#simulator { | ||
position: relative; | ||
width: 1400px; /* Adjust as needed */ | ||
height: 948px; /* Adjust as needed */ | ||
overflow: auto; | ||
top: 20px; /* Adjust as needed */ | ||
left: 20px; /* Adjust as needed */ | ||
overflow: hidden; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import { defineProps } from 'vue'; | ||
import Bs5Shell from "./bs5.vue"; | ||
import { onMounted, onUnmounted, computed } from 'vue'; | ||
const props = defineProps({ | ||
component: { | ||
type: Object, | ||
default: () => Bs5Shell, | ||
}, | ||
shell: { | ||
type: String, | ||
default: 'default', | ||
}, | ||
}); | ||
const isDefaultShell = computed(() => props.shell === 'default'); | ||
onMounted(() => { | ||
document.documentElement.style.overflow = isDefaultShell.value ? 'hidden' : 'auto'; | ||
}); | ||
onUnmounted(() => { | ||
document.documentElement.style.overflow = 'auto'; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<component :is="component"></component> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters