Allow configurable logo
This commit is contained in:
commit
c552411d61
@ -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;
|
||||
|
4
images/.directory
Normal file
4
images/.directory
Normal file
@ -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
|
@ -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;
|
||||
|
||||
|
@ -110,8 +110,10 @@ function welcomeMessage() {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once('ready', async function () {
|
||||
BoLUtility.ready()
|
||||
registerUsageCount('bol')
|
||||
|
||||
|
||||
welcomeMessage()
|
||||
})
|
||||
|
||||
|
@ -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()})`)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -1,8 +1,10 @@
|
||||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
<form class="{{cssClass}} flexcol bol-actor-form" autocomplete="off">
|
||||
<!--<img class="system-img" src="/systems/bol/ui/logo.webp" height="115" width="190"/> -->
|
||||
|
||||
<div class="wrap flexrow">
|
||||
|
||||
{{!-- Sidebar --}}
|
||||
<div class="sidebar flex0">
|
||||
<div class="sidebar flex0 bol-actor-sidebar">
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"
|
||||
style="border:1px outset lightgray; box-shadow: 5px 5px 5px gray" />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user