Rework title font and fix pause logo switching
This commit is contained in:
@@ -104,15 +104,33 @@ export class HawkmoonUtility {
|
||||
return this.skills
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static updatePauseLogo(html) {
|
||||
let logoPause = "systems/fvtt-hawkmoon-cyd/assets/logos/" + game.settings.get("fvtt-hawkmoon-cyd", "hawkmoon-pause-logo") + ".webp"
|
||||
console.log("Hawkmoon | Updating pause logo to:", logoPause)
|
||||
|
||||
// Supprimer l'ancien style s'il existe
|
||||
let oldStyle = document.getElementById('hawkmoon-pause-logo-override')
|
||||
if (oldStyle) {
|
||||
oldStyle.remove()
|
||||
}
|
||||
|
||||
// Injecter une règle CSS pour override le logo
|
||||
let styleSheet = document.createElement('style')
|
||||
styleSheet.id = 'hawkmoon-pause-logo-override'
|
||||
styleSheet.textContent = `#pause>img { content: url(${logoPause}) !important; }`
|
||||
document.head.appendChild(styleSheet)
|
||||
|
||||
console.log("Hawkmoon | Logo CSS rule injected")
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async ready() {
|
||||
const skills = await HawkmoonUtility.loadCompendium("fvtt-hawkmoon-cyd.skills")
|
||||
this.skills = skills.map(i => i.toObject())
|
||||
|
||||
// Setup pause logo
|
||||
let logoPause = "systems/fvtt-hawkmoon-cyd/assets/logos/" + game.settings.get("fvtt-hawkmoon-cyd", "hawkmoon-pause-logo") + ".webp"
|
||||
let logoImg = document.querySelector('#pause').children[0]
|
||||
logoImg.setAttribute('style', `content: url(${logoPause})`)
|
||||
this.updatePauseLogo()
|
||||
|
||||
game.system.hawkmoon.config.listeNiveauSkill = this.createDirectOptionList(0, 10)
|
||||
game.system.hawkmoon.config.listeNiveauCreature = this.createDirectOptionList(0, 35)
|
||||
|
||||
Reference in New Issue
Block a user