avoid text overlapping
This commit is contained in:
@@ -31,9 +31,9 @@ class GenericObject extends EventManager{
|
||||
|
||||
if (!data.exclude && (data.hud || data.description)){
|
||||
engine.clickable.add(this.object, async e=>{
|
||||
this.object.__onhud = !this.object.__onhud;
|
||||
if (engine.dashboard){
|
||||
if (data.hud){
|
||||
this.object.__onhud = !this.object.__onhud;
|
||||
const filterNoHud = a=>a.getClip().name.match(/\.nohud/)
|
||||
if (this.object._hud ){
|
||||
this.#actions.filter(filterNoHud).forEach(a=>a.play());
|
||||
@@ -59,10 +59,11 @@ class GenericObject extends EventManager{
|
||||
}
|
||||
}
|
||||
if (data.description){
|
||||
engine.dashboard.updateText(this.object.__onhud ? data.description : '', {
|
||||
engine.dashboard.updateText((!data.hud || this.object.__onhud) ? data.description : '', {
|
||||
textScrolledCallback: (d)=>{
|
||||
d && this.dispatchEvent({type:'finish'})
|
||||
}
|
||||
},
|
||||
hideOnFinish: true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user