make tooltips update instantly
This commit is contained in:
parent
59527962ba
commit
a169881a25
2 changed files with 6 additions and 2 deletions
|
|
@ -54,9 +54,11 @@ Hooks.on('renderTokenHUD', (app, html, data) => {
|
|||
if (wasActive && !isRequestingMsg) {
|
||||
btn.removeClass('active');
|
||||
icon.removeClass('fa-solid dh-spotlight-glow').addClass('fa-regular');
|
||||
btn.attr('title', 'Grant Spotlight');
|
||||
} else {
|
||||
btn.addClass('active');
|
||||
icon.removeClass('fa-regular dh-spotlight-request').addClass('fa-solid dh-spotlight-glow');
|
||||
btn.attr('title', 'Take Spotlight');
|
||||
}
|
||||
await ui.combat.setCombatantSpotlight(token.combatant.id);
|
||||
}
|
||||
|
|
@ -76,9 +78,11 @@ Hooks.on('renderTokenHUD', (app, html, data) => {
|
|||
if (currentlyRequesting) {
|
||||
btn.removeClass('active');
|
||||
icon.removeClass('fa-solid dh-spotlight-request').addClass('fa-regular');
|
||||
btn.attr('title', 'Request Spotlight');
|
||||
} else {
|
||||
btn.addClass('active');
|
||||
icon.removeClass('fa-regular').addClass('fa-solid dh-spotlight-request');
|
||||
btn.attr('title', 'Cancel Spotlight Request');
|
||||
}
|
||||
|
||||
await token.combatant.update({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue