Utiliser des polices pour les dés
Afin de ne pas avoir de soucis de couleurs
This commit is contained in:
parent
06a79cba76
commit
a326e43ff6
Binary file not shown.
BIN
fonts/heuresdraconiques2.ttf
Normal file
BIN
fonts/heuresdraconiques2.ttf
Normal file
Binary file not shown.
BIN
fonts/heuresdraconiques2.woff
Normal file
BIN
fonts/heuresdraconiques2.woff
Normal file
Binary file not shown.
BIN
fonts/heuresdraconiques2.woff2
Normal file
BIN
fonts/heuresdraconiques2.woff2
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
@ -11,9 +11,9 @@ const dossierIconesHeures = 'systems/foundryvtt-reve-de-dragon/icons/heures/'
|
|||||||
const heuresList = ["vaisseau", "sirene", "faucon", "couronne", "dragon", "epees", "lyre", "serpent", "poissonacrobate", "araignee", "roseau", "chateaudormant"];
|
const heuresList = ["vaisseau", "sirene", "faucon", "couronne", "dragon", "epees", "lyre", "serpent", "poissonacrobate", "araignee", "roseau", "chateaudormant"];
|
||||||
const heuresDef = {
|
const heuresDef = {
|
||||||
"vaisseau": { label: "Vaisseau", lettreFont: 'v', saison: "printemps", heure: 0, icon: 'hd01.svg' },
|
"vaisseau": { label: "Vaisseau", lettreFont: 'v', saison: "printemps", heure: 0, icon: 'hd01.svg' },
|
||||||
"sirene": { label: "Sirène", lettreFont: 'S', saison: "printemps", heure: 1, icon: 'hd02.svg' },
|
"sirene": { label: "Sirène", lettreFont: 'i', saison: "printemps", heure: 1, icon: 'hd02.svg' },
|
||||||
"faucon": { label: "Faucon", lettreFont: 'f', saison: "printemps", heure: 2, icon: 'hd03.svg' },
|
"faucon": { label: "Faucon", lettreFont: 'f', saison: "printemps", heure: 2, icon: 'hd03.svg' },
|
||||||
"couronne": { label: "Couronne", lettreFont: 'C', saison: "ete", heure: 3, icon: 'hd04.svg' },
|
"couronne": { label: "Couronne", lettreFont: '', saison: "ete", heure: 3, icon: 'hd04.svg' },
|
||||||
"dragon": { label: "Dragon", lettreFont: 'd', saison: "ete", heure: 4, icon: 'hd05.svg' },
|
"dragon": { label: "Dragon", lettreFont: 'd', saison: "ete", heure: 4, icon: 'hd05.svg' },
|
||||||
"epees": { label: "Epées", lettreFont: 'e', saison: "ete", heure: 5, icon: 'hd06.svg' },
|
"epees": { label: "Epées", lettreFont: 'e', saison: "ete", heure: 5, icon: 'hd06.svg' },
|
||||||
"lyre": { label: "Lyre", lettreFont: 'l', saison: "automne", heure: 6, icon: 'hd07.svg' },
|
"lyre": { label: "Lyre", lettreFont: 'l', saison: "automne", heure: 6, icon: 'hd07.svg' },
|
||||||
|
@ -6,18 +6,15 @@ function img(src) {
|
|||||||
return `<img src="${src}" class="dice-img" />`
|
return `<img src="${src}" class="dice-img" />`
|
||||||
}
|
}
|
||||||
|
|
||||||
function iconHeure(heure){
|
function iconHeure(heure) {
|
||||||
if (heure<10) {
|
if (heure < 10) {
|
||||||
heure = '0'+heure;
|
heure = '0' + heure;
|
||||||
}
|
}
|
||||||
return `systems/foundryvtt-reve-de-dragon/icons/heures/hd${heure}.webp`
|
return `systems/foundryvtt-reve-de-dragon/icons/heures/hd${heure}.webp`
|
||||||
}
|
}
|
||||||
|
const imagesHeures = [1, 2, 3, 4, 5, 6, 7, 9, 9, 10, 11, 12].map(it => iconHeure(it));
|
||||||
|
|
||||||
const signeDragon = 'systems/foundryvtt-reve-de-dragon/icons/heures/hdragon.webp';
|
const imgSigneDragon = img(imagesHeures[4]);
|
||||||
const imgSigneDragon = img(signeDragon);
|
|
||||||
const labelsDeDragon = ['1', '2', '3', '4', '5', '6', signeDragon, '0'];
|
|
||||||
const bumpsDeDragon = [, , , , , , signeDragon,];
|
|
||||||
const signeHeure = 'systems/foundryvtt-reve-de-dragon/icons/heures/hd';
|
|
||||||
|
|
||||||
/** De7 pour les jets de rencontre */
|
/** De7 pour les jets de rencontre */
|
||||||
export class De7 extends Die {
|
export class De7 extends Die {
|
||||||
@ -25,7 +22,13 @@ export class De7 extends Die {
|
|||||||
static DENOMINATION = "7";
|
static DENOMINATION = "7";
|
||||||
|
|
||||||
static diceSoNiceData(system) {
|
static diceSoNiceData(system) {
|
||||||
return { type: "d7", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system }
|
return {
|
||||||
|
type: "d7",
|
||||||
|
font: "HeuresDraconiques",
|
||||||
|
fontScale : 0.7,
|
||||||
|
labels: ['1', '2', '3', '4', '5', '6', 'd', '0'],
|
||||||
|
system: system
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(termData) {
|
constructor(termData) {
|
||||||
@ -45,7 +48,7 @@ export class De7 extends Die {
|
|||||||
|
|
||||||
static getResultLabel(result) {
|
static getResultLabel(result) {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case 7: return imgSigneDragon
|
case 7: return imgSigneDragon;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -56,7 +59,13 @@ export class DeDraconique extends Die {
|
|||||||
static DENOMINATION = "r";
|
static DENOMINATION = "r";
|
||||||
|
|
||||||
static diceSoNiceData(system) {
|
static diceSoNiceData(system) {
|
||||||
return { type: "dr", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system }
|
return {
|
||||||
|
type: "dr",
|
||||||
|
font: "HeuresDraconiques",
|
||||||
|
fontScale : 0.7,
|
||||||
|
labels: ['1', '2', '3', '4', '5', '6', 'd', '0'],
|
||||||
|
system: system
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(termData) {
|
constructor(termData) {
|
||||||
@ -76,14 +85,13 @@ export class DeDraconique extends Die {
|
|||||||
|
|
||||||
static getResultLabel(result) {
|
static getResultLabel(result) {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case 7: return imgSigneDragon
|
case 7: return imgSigneDragon;
|
||||||
|
case 8: return 0;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const imagesHeures = [1, 2, 3, 4, 5, 6, 7, 9, 9, 10, 11, 12].map(it => iconHeure(it));
|
|
||||||
|
|
||||||
/** De 12 avec les heures */
|
/** De 12 avec les heures */
|
||||||
export class DeHeure extends Die {
|
export class DeHeure extends Die {
|
||||||
|
|
||||||
@ -93,8 +101,8 @@ export class DeHeure extends Die {
|
|||||||
static diceSoNiceData(system) {
|
static diceSoNiceData(system) {
|
||||||
return {
|
return {
|
||||||
type: "dh",
|
type: "dh",
|
||||||
labels: imagesHeures,
|
font: "HeuresDraconiques",
|
||||||
bumpMaps: imagesHeures,
|
labels: ['v', 'i', 'f', 'o', 'd', 'e', 'l', 's', 'p', 'a', 'r', 'c'],
|
||||||
system: system
|
system: system
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +113,7 @@ export class DeHeure extends Die {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static getResultLabel(result) {
|
static getResultLabel(result) {
|
||||||
return img(imagesHeures[result]);
|
return img(imagesHeures[result-1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,14 @@
|
|||||||
src: url('../fonts/CaslonAntique.ttf') format("truetype");
|
src: url('../fonts/CaslonAntique.ttf') format("truetype");
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "heures Draconiques";
|
font-family: 'HeuresDraconiques';
|
||||||
src: url('../fonts/heures_draconiques.ttf') format("truetype");
|
src:
|
||||||
}
|
url('../fonts/heuresdraconiques2.woff') format('woff'),
|
||||||
|
url('../fonts/heuresdraconiques2.woff2') format('woff2'),
|
||||||
|
url('../fonts/heuresdraconiques2.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
|
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
|
||||||
|
Loading…
Reference in New Issue
Block a user