allow texts to appear on interactive object finish event
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div v-if="modelValue.go">
|
||||
<v-select :label="l.dimensions" v-model="modelValue.dimension" :items="['3x3', '5x4', '6x6', 'variant', 'variant-2', 'triangles']" density="compact"></v-select>
|
||||
<v-textarea :label="l.description" v-model="modelValue.introText"></v-textarea>
|
||||
<v-textarea :label="l.outroText" v-model="modelValue.outroText"></v-textarea>
|
||||
<v-img :src="`/asset/thumb/${modelValue.go}.webp`" />
|
||||
<div class="text-caption text-center">{{ modelValue.title }}</div>
|
||||
</div>
|
||||
|
||||
@@ -77,6 +77,11 @@ class InteractiveObject extends EventManager{
|
||||
engine.tm?.setGameObject(obj.id);
|
||||
})
|
||||
}
|
||||
if (this.emits?.includes('finish') && obj.outroText){
|
||||
this.io.once('finish', ()=>{
|
||||
engine.dashboard.updateText(obj.outroText, {hideOnFinish: true});
|
||||
})
|
||||
}
|
||||
['minPoints', 'maxPoints'].filter(p=>this.io[p] !== undefined).forEach(p=> this[p] = this.io[p] )
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ const lang = {
|
||||
advanced: 'Complex (not implemented)'
|
||||
},
|
||||
dimensions: 'Dimensions',
|
||||
outroText: 'Text on finish',
|
||||
elementsCount: 'Number of elements',
|
||||
particleWidth: 'Particle width',
|
||||
particleHeight: 'Particle height',
|
||||
@@ -229,6 +230,7 @@ const lang = {
|
||||
advanced: 'С голяма точност (not implemented)'
|
||||
},
|
||||
dimensions: 'Размери',
|
||||
outroText: 'Текст при изпълнение',
|
||||
elementsCount: 'Брой елементи',
|
||||
particleWidth: 'Ширина на частиците',
|
||||
particleHeight: 'Височина на частиците',
|
||||
|
||||
Reference in New Issue
Block a user