mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
* Added confirm dialogs to delete * Localization fix * Changed Cone template to be 'In Front', acting as a 180 degree cone * Changed to keep the original Cone function
16 lines
638 B
JavaScript
16 lines
638 B
JavaScript
export default class DhTooltipManager extends foundry.helpers.interaction.TooltipManager {
|
|
async activate(element, options = {}) {
|
|
let html = options.html;
|
|
if (element.dataset.tooltip?.startsWith('#item#')) {
|
|
const item = await foundry.utils.fromUuid(element.dataset.tooltip.slice(6));
|
|
if (item) {
|
|
html = await foundry.applications.handlebars.renderTemplate(
|
|
`systems/daggerheart/templates/ui/tooltip/${item.type}.hbs`,
|
|
item
|
|
);
|
|
}
|
|
}
|
|
|
|
super.activate(element, { ...options, html: html });
|
|
}
|
|
}
|