From b5c40971c4498474bbdf702ce975355a60cbc774 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Tue, 31 Mar 2026 01:16:25 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20logo=20de=20pause=20=E2=80=94=20correcti?= =?UTF-8?q?on=20s=C3=A9lecteur=20CSS=20et=20hook=20v13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Patch GamePause.prototype._prepareContext dans le hook init (hook renderPause n'existe pas en v13, classe = GamePause) - CSS : #pause img (non #pause figure img car #pause est lui-même le
) - Taille 600px / 50vw, halo doré, figcaption masquée Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- fvtt-celestopol.mjs | 20 ++++++++++++-------- styles/global.less | 16 ++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/fvtt-celestopol.mjs b/fvtt-celestopol.mjs index 056ca76..7d4f68d 100644 --- a/fvtt-celestopol.mjs +++ b/fvtt-celestopol.mjs @@ -35,6 +35,18 @@ Hooks.once("init", () => { console.log(ASCII) console.log(`${SYSTEM_ID} | Initializing Célestopol 1922 system`) + // Logo de pause : patch de GamePause._prepareContext pour remplacer l'icône + const GamePause = foundry.applications.hud?.GamePause ?? globalThis.GamePause + if (GamePause) { + const _origCtx = GamePause.prototype._prepareContext + GamePause.prototype._prepareContext = async function(options) { + const ctx = await _origCtx.call(this, options) + ctx.icon = "systems/fvtt-celestopol/assets/ui/logo_jeu.png" + ctx.spin = false + return ctx + } + } + // Expose SYSTEM constants in game.system namespace game.celestopol = { SYSTEM } @@ -119,14 +131,6 @@ Hooks.once("init", () => { /* ─── Ready hook ─────────────────────────────────────────────────────────── */ -// Remplace le logo de pause par celui du jeu -Hooks.on("renderPause", (_app, html) => { - const root = html instanceof HTMLElement ? html : html[0] - if (!root) return - const img = root.tagName === "IMG" ? root : root.querySelector("img") - if (img) img.src = "systems/fvtt-celestopol/assets/ui/logo_jeu.png" -}) - /* ─── Ready hook ─────────────────────────────────────────────────────────── */ Hooks.once("ready", () => { diff --git a/styles/global.less b/styles/global.less index e13a543..6ca10f8 100644 --- a/styles/global.less +++ b/styles/global.less @@ -339,15 +339,15 @@ } // ─── Logo de pause ──────────────────────────────────────────────────────────── +// #pause est lui-même un
(GamePause.tag = "figure" en v13) #pause { - figure { - img { - animation: none; // Supprime la rotation du logo Foundry par défaut - filter: drop-shadow(0 0 20px rgba(196, 154, 26, 0.7)); - max-width: 480px; - width: 60vw; - } - figcaption { display: none; } // Le logo parle de lui-même + img { + animation: none; // Supprime la rotation du logo Foundry par défaut + filter: drop-shadow(0 0 24px rgba(196, 154, 26, 0.8)); + max-width: 600px; + width: 50vw; + min-width: 280px; } + figcaption { display: none; } // Le logo parle de lui-même }