From 019bce87902db8fe25b13118487935918aa6e7ca Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 21 Dec 2020 23:41:17 +0100 Subject: [PATCH] =?UTF-8?q?Afficher=20les=20sous=20menu=20par=20d=C3=A9fau?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/rdd-token-hud.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/rdd-token-hud.js b/module/rdd-token-hud.js index b2554eb1..490caba3 100644 --- a/module/rdd-token-hud.js +++ b/module/rdd-token-hud.js @@ -17,9 +17,9 @@ export class RdDTokenHud { if (!token.inCombat) return; if (!combatant) return; - const hudData = { combatant: combatant, armes: RdDTokenHud.buildListeActionsCombat(combatant) }; + let armesList = RdDTokenHud.buildListeActionsCombat(combatant) ; + const hudData = { combatant: combatant, armes: armesList }; - let armesList = RdDUtility.buildArmeList(combatant); // initiative await RdDTokenHud._configureSubMenu(html.find('.control-icon.combat'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', hudData, (event) => { @@ -54,6 +54,7 @@ export class RdDTokenHud { const imgHud = hud.find('img.rdd-hud-togglebutton'); const list = hud.find('div.rdd-hud-list'); + hud.toggleClass('active'); HtmlUtility._showControlWhen(list, hud.hasClass('active')); imgHud.click(event => {