interactive objects parametrization
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<slot name="activator" v-bind="activatorProps" @click="dialog = !dialog"></slot>
|
||||
<v-dialog transition="dialog-bottom-transition" fullscreen v-model="dialog">
|
||||
<v-card title="Assets">
|
||||
<v-container v-if="type?.includes('GameObject')">
|
||||
<v-btn v-for="(v, i) in InteractiveObjectTypes" @click="select(v, 'InteractiveObject')">{{ v.id }}</v-btn>
|
||||
</v-container>
|
||||
<AssetBrowser :query="query" @select="select" :hideFilter="true"></AssetBrowser>
|
||||
<v-card-actions>
|
||||
<v-btn text="Close" color="primary" @click="dialog = false"></v-btn>
|
||||
@@ -12,6 +15,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { InteractiveObjectTypes } from '../InteractiveObjects/InteractiveObject';
|
||||
|
||||
export default {
|
||||
props:[
|
||||
'modelValue', 'type'
|
||||
@@ -19,6 +24,7 @@ export default {
|
||||
emits:['select'],
|
||||
data(){
|
||||
return {
|
||||
InteractiveObjectTypes,
|
||||
query: {
|
||||
type: { $in: this.$p.objectTypes.filter(t=>!this.type || this.type.includes(t.type)).map(t=>t.value) }
|
||||
},
|
||||
@@ -30,8 +36,8 @@ export default {
|
||||
async created(){},
|
||||
|
||||
methods:{
|
||||
select(v){
|
||||
this.$emit('select', { id: v.id, name: v.name });
|
||||
select(v, type){
|
||||
this.$emit('select', { id: v.id, name: v.name, type });
|
||||
this.dialog = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user