mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Improved resourceManager clickable
This commit is contained in:
parent
e102a28305
commit
62d08c8fab
5 changed files with 25 additions and 3 deletions
|
|
@ -986,7 +986,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
const target = button.closest('.resource-section');
|
||||
|
||||
// game.tooltip.dismissLockedTooltips();
|
||||
game.tooltip.dismissLockedTooltips();
|
||||
game.tooltip.activate(target, {
|
||||
html,
|
||||
locked: true,
|
||||
|
|
@ -995,6 +995,13 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
noOffset: true
|
||||
});
|
||||
|
||||
const resourceManager = target.querySelector('.resource-manager');
|
||||
resourceManager.classList.toggle('inverted');
|
||||
|
||||
Hooks.once(CONFIG.DH.HOOKS.hooksConfig.lockedTooltipDismissed, () => {
|
||||
resourceManager.classList.toggle('inverted');
|
||||
});
|
||||
|
||||
for (const element of html.querySelectorAll('.resource-value'))
|
||||
element.addEventListener('click', CharacterSheet.resourceUpdate.bind(this));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue