ultrawidify/src/csui/PlayerUiComponent.vue

128 lines
2.4 KiB
Vue
Raw Normal View History

2020-12-15 00:26:19 +01:00
<template>
<div class="uw-hover uv-hover-trigger-region">
TEST CONTENT
</div>
<div class="uw-debug-info">
<ResizerDebugPanel :debugData="debugData">
</ResizerDebugPanel>
2020-12-15 00:26:19 +01:00
</div>
</template>
<script>
import { mapState } from 'vuex';
import Icon from '../common/components/Icon';
import ResizerDebugPanel from './PlayerUiPanels/ResizerDebugPanelComponent';
2020-12-15 00:26:19 +01:00
export default {
components: {
Icon,
ResizerDebugPanel
2020-12-15 00:26:19 +01:00
},
data() {
return {
uiVisible: true,
debugData: {
resizer: {},
player: {},
2020-12-16 01:40:09 +01:00
},
debugDataPrettified: ''
2020-12-15 00:26:19 +01:00
};
},
computed: {
...mapState([
'showUi',
'resizerDebugData',
'playerDebugData'
2020-12-15 00:26:19 +01:00
]),
2020-12-16 01:40:09 +01:00
windowWidth: () => {
return window.innerWidth;
},
windowHeight: () => {
return window.innerHeight;
},
2020-12-15 00:26:19 +01:00
},
watch: {
showUi(visible) {
if (visible !== undefined) {
this.uiVisible = visible;
}
},
resizerDebugData(newData) {
this.debugData.resizer = newData;
2020-12-16 01:40:09 +01:00
this.debugDataPrettified = JSON.stringify(this.debugData, null, 2);
},
playerDebugData(newData) {
this.debugData.player = newData;
2020-12-16 01:40:09 +01:00
this.debugDataPrettified = JSON.stringify(this.debugData, null, 2);
2020-12-15 00:26:19 +01:00
}
},
created() {
console.log("created!");
console.log("store:", this.$store, this);
},
methods: {
2020-12-22 03:14:03 +01:00
getUrl(url) {
2020-12-30 15:35:54 +01:00
return BrowserDetect.getURL(url);
},
2020-12-15 00:26:19 +01:00
}
}
</script>
2020-12-16 01:40:09 +01:00
<style lang="scss" src="../res/css/uwui-base.scss" scoped></style>
2020-12-15 00:26:19 +01:00
<style lang="scss" scoped>
@import '../res/css/uwui-base.scss';
@import '../res/css/colors.scss';
@import '../res/css/font/overpass.css';
@import '../res/css/font/overpass-mono.css';
@import '../res/css/common.scss';
.uw-ultrawidify-container-root {
// .relative-wrapper {
// position: relative;
// width: 100%;
// height: 100%;
// }
2020-12-15 00:26:19 +01:00
.uw-hover {
position: absolute;
top: 10%;
left: 10%;
2020-12-15 00:26:19 +01:00
width: 100px;
height: 100px;
color: #fff;
background-color: #000;
2020-12-16 01:40:09 +01:00
z-index: 999999999999999999;
2020-12-15 00:26:19 +01:00
}
.uw-hover:hover {
background-color: #f00;
}
2020-12-16 01:40:09 +01:00
.uw-debug-info {
position: absolute;
top: 10%;
left: 10%;
z-index: 999999999999999999;
width: 2500px;
height: 1200px;
max-width: 80%;
max-height: 80%;
2020-12-16 01:40:09 +01:00
pointer-events: all !important;
background-color: rgba(0,0,0,0.69);
color: #fff;
overflow-y: scroll;
}
pre {
white-space: pre-wrap;
}
2020-12-15 00:26:19 +01:00
}
</style>