Ajout de zIndex pour afficher le demi-rêve devant

This commit is contained in:
Vincent Vandemeulebrouck
2021-02-12 15:01:10 +01:00
parent d700fc7b6c
commit b469461cf6
15 changed files with 87 additions and 29 deletions

View File

@ -1,4 +1,4 @@
import { tmrConstants } from "../tmr-utility.js";
import { tmrConstants, tmrTokenZIndex } from "../tmr-utility.js";
const tooltipStyle = new PIXI.TextStyle({
fontFamily: 'CaslonAntique',
@ -16,6 +16,7 @@ export class PixiTMR {
constructor(tmrObject, pixiApp) {
this.tmrObject = tmrObject;
this.pixiApp = pixiApp ?? tmrObject.pixiApp;
this.pixiApp.stage.sortableChildren = true;
this.callbacksOnAnimate = [];
}
@ -79,6 +80,7 @@ export class PixiTMR {
if (options.color) {
sprite.tint = options.color;
}
sprite.zIndex = options.zIndex ?? tmrTokenZIndex.casehumide+1;
sprite.alpha = options.alpha ?? 0.75;
sprite.decallage = options.decallage ?? tmrConstants.center;
this.pixiApp.stage.addChild(sprite);