diff --git a/css/bol.css b/css/bol.css index d704283..1de5c34 100644 --- a/css/bol.css +++ b/css/bol.css @@ -769,7 +769,7 @@ body.system-bol img#logo { min-height: 700px; height: 700px; } -.bol.sheet.actor .window-content form { +.bol.sheet.actor .window-content .bol-actor-form { background-image: url("/systems/bol/ui/logo.webp"); background-repeat: no-repeat; background-size: 190px 115px; diff --git a/images/.directory b/images/.directory new file mode 100644 index 0000000..6243d4b --- /dev/null +++ b/images/.directory @@ -0,0 +1,4 @@ +[Dolphin] +Timestamp=2022,7,17,14,58,4.757 +Version=4 +VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index a6c4469..8b13669 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -25,6 +25,13 @@ export class BoLActorSheet extends ActorSheet { activateListeners(html) { super.activateListeners(html); + function onLoad() { + let logoSheet = BoLUtility.getLogoActorSheet() + $(".bol-actor-form").css("backgroundImage",`url(${logoSheet})`) + } + // Setup everything onload + $(function () { onLoad(); }); + // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; diff --git a/module/bol.js b/module/bol.js index 1759b1e..11cdfd6 100644 --- a/module/bol.js +++ b/module/bol.js @@ -110,8 +110,10 @@ function welcomeMessage() { /* -------------------------------------------- */ Hooks.once('ready', async function () { + BoLUtility.ready() registerUsageCount('bol') + welcomeMessage() }) diff --git a/module/system/bol-utility.js b/module/system/bol-utility.js index 426f2b8..5ce720f 100644 --- a/module/system/bol-utility.js +++ b/module/system/bol-utility.js @@ -18,7 +18,7 @@ export class BoLUtility { default: true, type: Boolean, onChange: lang => window.location.reload() - }); + }) game.settings.register("bol", "useBougette", { name: "Utiliser la Bougette (règle fan-made)", hint: "Utilise un indicateur de Bougette, comme décrit dans l'aide de jeu Gold&Glory du RatierBretonnien (https://www.lahiette.com/leratierbretonnien/)", @@ -27,14 +27,32 @@ export class BoLUtility { default: false, type: Boolean, onChange: lang => window.location.reload() - }); + }) + game.settings.register("bol", "logoActorSheet", { + name: "Chemin du logo des fiches de perso", + hint: "Vous pouvez changer le logo BoL des fiches de perso, pour jouer dans un autre univers (idéalement 346 x 200, défaut : /systems/bol/ui/logo.webp)", + scope: "world", + config: true, + default: "/systems/bol/ui/logo.webp", + type: String, + onChange: lang => window.location.reload() + }) + game.settings.register("bol", "logoTopLeft", { + name: "Chemin du logo haut gauche", + hint: "Vous pouvez changer le logo BoL en haut à gauche de chaque écran (idéalement 718 x 416, défaut : /systems/bol/ui/logo2.webp)", + scope: "world", + config: true, + default: "/systems/bol/ui/logo2.webp", + type: String, + onChange: lang => window.location.reload() + }) this.rollArmor = game.settings.get("bol", "rollArmor") // Roll armor or not this.useBougette = game.settings.get("bol", "useBougette") // Use optionnal bougette rules - + this.actorSheetLogo = game.settings.get("bol", "logoActorSheet") || "/systems/bol/ui/logo.webp" + this.logoTopLeft = game.settings.get("bol", "logoTopLeft") || "/systems/bol/ui/logo2.webp" } - /* -------------------------------------------- */ static getRollArmor() { return this.rollArmor @@ -43,9 +61,19 @@ export class BoLUtility { static getUseBougette() { return this.useBougette } - + /* -------------------------------------------- */ + static getLogoActorSheet() { + return this.actorSheetLogo + } + /* -------------------------------------------- */ + static getLogoTopLeft() { + return this.logoTopLeft + } + /* -------------------------------------------- */ static async ready() { + //$("#logo").attr("src", this.getLogoTopLeft() ) + $("#logo").css("content",`url(${this.getLogoTopLeft()})`) } /* -------------------------------------------- */ diff --git a/templates/actor/actor-sheet.hbs b/templates/actor/actor-sheet.hbs index ff3a378..c54549a 100644 --- a/templates/actor/actor-sheet.hbs +++ b/templates/actor/actor-sheet.hbs @@ -1,8 +1,10 @@ -