Ajout de zIndex pour afficher le demi-rêve devant
This commit is contained in:
parent
d700fc7b6c
commit
b469461cf6
@ -274,7 +274,15 @@ export const tmrColors = {
|
||||
rencontre: 0xFF0000,
|
||||
casehumide: 0x1050F0,
|
||||
}
|
||||
|
||||
export const tmrTokenZIndex = {
|
||||
sort: 40,
|
||||
tetes: 20,
|
||||
casehumide: 10,
|
||||
conquete: 30,
|
||||
rencontre: 50,
|
||||
trounoir: 60,
|
||||
demireve: 70,
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Misc } from "../misc.js";
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class Conquete extends Draconique {
|
||||
@ -20,7 +20,10 @@ export class Conquete extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: tmrColors.queues, taille: tmrConstants.full, decallage: { x: 2, y: 0 }
|
||||
zIndex: tmrTokenZIndex.conquete,
|
||||
color: tmrColors.queues,
|
||||
taille: tmrConstants.full,
|
||||
decallage: { x: 2, y: 0 }
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class Debordement extends Draconique {
|
||||
@ -19,7 +19,10 @@ export class Debordement extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: tmrColors.casehumide, taille: tmrConstants.twoThird, decallage: tmrConstants.bottom
|
||||
color: tmrColors.casehumide,
|
||||
zIndex: tmrTokenZIndex.casehumide,
|
||||
taille: tmrConstants.twoThird,
|
||||
decallage: tmrConstants.bottom,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class DemiReve extends Draconique {
|
||||
@ -19,6 +19,7 @@ export class DemiReve extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
const sprite = pixiTMR.sprite(this.code(), {
|
||||
color: tmrColors.demireve,
|
||||
zIndex: tmrTokenZIndex.demireve,
|
||||
taille: (tmrConstants.full * 0.7)
|
||||
});
|
||||
pixiTMR.animate(pixiApp => pixiApp.ticker.add((delta) => sprite.rotation -= 0.01 * delta));
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Misc } from "../misc.js";
|
||||
import { RollDataAjustements } from "../rolldata-ajustements.js";
|
||||
import { tmrColors, tmrConstants, TMRType, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRType, TMRUtility } from "../tmr-utility.js";
|
||||
import { Debordement } from "./debordement.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
@ -36,7 +36,11 @@ export class Desorientation extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: tmrColors.trounoir, alpha: 1, taille: tmrConstants.full, decallage: { x: 2, y: 2 },
|
||||
zIndex: tmrTokenZIndex.trounoir,
|
||||
color: tmrColors.trounoir,
|
||||
alpha: 1,
|
||||
taille: tmrConstants.full,
|
||||
decallage: { x: 2, y: 2 },
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class FermetureCites extends Draconique {
|
||||
@ -19,7 +19,11 @@ export class FermetureCites extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: tmrColors.souffle, alpha: 0.9, taille: tmrConstants.full, decallage: { x: 2, y: 0 }
|
||||
zIndex: tmrTokenZIndex.conquete,
|
||||
color: tmrColors.souffle,
|
||||
alpha: 0.9,
|
||||
taille: tmrConstants.full,
|
||||
decallage: { x: 2, y: 0 }
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class PontImpraticable extends Draconique {
|
||||
@ -20,7 +20,11 @@ export class PontImpraticable extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: tmrColors.casehumide, alpha: 0.5, taille: tmrConstants.twoThird, decallage: tmrConstants.bottom
|
||||
zIndex: tmrTokenZIndex.casehumide,
|
||||
color: tmrColors.casehumide,
|
||||
alpha: 0.5,
|
||||
taille: tmrConstants.twoThird,
|
||||
decallage: tmrConstants.bottom
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChatUtility } from "../chat-utility.js";
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class PresentCites extends Draconique {
|
||||
@ -20,7 +20,11 @@ export class PresentCites extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: 0xFEFEFE, alpha: 0.8, taille: tmrConstants.third, decallage: tmrConstants.topRight
|
||||
zIndex: tmrTokenZIndex.tetes,
|
||||
color: 0xFEFEFE,
|
||||
alpha: 0.8,
|
||||
taille: tmrConstants.third,
|
||||
decallage: tmrConstants.topRight
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class QueteEaux extends Draconique {
|
||||
@ -16,10 +16,14 @@ export class QueteEaux extends Draconique {
|
||||
img() { return 'icons/svg/bridge.svg' }
|
||||
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), { color: tmrColors.tetes, decallage: tmrConstants.topRight });
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.casehumide + 1,
|
||||
color: tmrColors.tetes,
|
||||
decallage: tmrConstants.topRight
|
||||
});
|
||||
}
|
||||
|
||||
async _creerCaseTmr(actor) {
|
||||
await this.createCaseTmr(actor, "Quête des eaux à déterminer", {coord:'A0'});
|
||||
await this.createCaseTmr(actor, "Quête des eaux à déterminer", { coord: 'A0' });
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class Rencontre extends Draconique {
|
||||
@ -17,6 +17,11 @@ export class Rencontre extends Draconique {
|
||||
img() { return 'systems/foundryvtt-reve-de-dragon/icons/heures/hd06.svg' }
|
||||
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), { color: tmrColors.rencontre, taille: tmrConstants.full, decallage: { x: 2, y: 2 } });
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.rencontre,
|
||||
color: tmrColors.rencontre,
|
||||
taille: tmrConstants.full,
|
||||
decallage: { x: 2, y: 2 }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class ReserveExtensible extends Draconique {
|
||||
@ -16,7 +16,11 @@ export class ReserveExtensible extends Draconique {
|
||||
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/treasure-chest.svg' }
|
||||
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), { alpha: 0.9, decallage: tmrConstants.left});
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.tetes,
|
||||
alpha: 0.9,
|
||||
decallage: tmrConstants.left
|
||||
});
|
||||
}
|
||||
|
||||
async _creerCaseTmr(actor) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class SortReserve extends Draconique {
|
||||
@ -17,6 +17,10 @@ export class SortReserve extends Draconique {
|
||||
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/scroll.svg' }
|
||||
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), { alpha: 0.5, decallage: tmrConstants.right });
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.sort,
|
||||
alpha: 0.5,
|
||||
decallage: tmrConstants.right
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class TerreAttache extends Draconique {
|
||||
@ -16,10 +16,14 @@ export class TerreAttache extends Draconique {
|
||||
img() { return 'icons/svg/anchor.svg' }
|
||||
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), { color: tmrColors.tetes, decallage: tmrConstants.topLeft });
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.tetes,
|
||||
color: tmrColors.tetes,
|
||||
decallage: tmrConstants.topLeft
|
||||
});
|
||||
}
|
||||
|
||||
async _creerCaseTmr(actor) {
|
||||
await this.createCaseTmr(actor, "Terre d'attache à déterminer", {coord:'A0'});
|
||||
await this.createCaseTmr(actor, "Terre d'attache à déterminer", { coord: 'A0' });
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { tmrColors, tmrConstants, TMRUtility } from "../tmr-utility.js";
|
||||
import { tmrColors, tmrConstants, tmrTokenZIndex, TMRUtility } from "../tmr-utility.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
|
||||
export class TrouNoir extends Draconique {
|
||||
@ -18,7 +18,11 @@ export class TrouNoir extends Draconique {
|
||||
_createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(),
|
||||
{
|
||||
color: tmrColors.trounoir, alpha: 1, taille: tmrConstants.full, decallage: { x: 2, y: 2 },
|
||||
zIndex: tmrTokenZIndex.trounoir,
|
||||
color: tmrColors.trounoir,
|
||||
alpha: 1, taille:
|
||||
tmrConstants.full,
|
||||
decallage: { x: 2, y: 2 },
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user