link scenarios to backend
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
<teleport to=".scene-designer" v-if="active">
|
||||
<g @mousedown="$emit('target', {target:vd, attrs:['x1', 'y1'], delta: true})" :class="{gameObject: true, selected}">
|
||||
<line :x1="vd.x1" :y1="vd.y1" :x2="parent.vd.x1" :y2="parent.vd.y1"></line>
|
||||
<svg-icon :src="`/asset/thumb/${modelValue.id}.webp`" :x="vd.x1" :y="vd.y1" :size="37"></svg-icon>
|
||||
<svg-icon :src="`/asset/thumb/${modelValue.id||0}.webp`" :x="vd.x1" :y="vd.y1" :size="37"></svg-icon>
|
||||
</g>
|
||||
</teleport>
|
||||
<v-list density="compact" nav v-if="selected">
|
||||
<v-list-item prepend-icon="mdi-panorama-outline" :title="$l.addScene" value="scene"></v-list-item>
|
||||
</v-list>
|
||||
<v-card v-if="selected">
|
||||
<asset-selector @select="modelValue.id = $event" type="GameObject">
|
||||
<template v-slot:activator="props">
|
||||
<v-btn v-bind="props" icon="mdi-panorama-outline"></v-btn>
|
||||
</template>
|
||||
</asset-selector>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -15,7 +19,7 @@ import SvgIcon from './SvgIcon.vue';
|
||||
import Utils from '@/lib/utils';
|
||||
|
||||
export default {
|
||||
emits:['target'],
|
||||
emits:['target'],
|
||||
components: { SvgIcon },
|
||||
data(){
|
||||
return {
|
||||
@@ -26,6 +30,7 @@ export default {
|
||||
this.active = true;
|
||||
},
|
||||
props:{
|
||||
//context: Object,
|
||||
modelValue: Object,
|
||||
vd: Object,
|
||||
selected: Boolean,
|
||||
|
||||
Reference in New Issue
Block a user