mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed so enriched buttons are inline by default. Can be set to 'inline:true' to make them fit with the text better (#1068)
This commit is contained in:
parent
f76515eac1
commit
936c96a1be
5 changed files with 30 additions and 7 deletions
|
|
@ -2,7 +2,8 @@ export default function DhTemplateEnricher(match, _options) {
|
|||
const parts = match[1].split('|').map(x => x.trim());
|
||||
|
||||
let type = null,
|
||||
range = null;
|
||||
range = null,
|
||||
inline = false;
|
||||
|
||||
parts.forEach(part => {
|
||||
const split = part.split(':').map(x => x.toLowerCase().trim());
|
||||
|
|
@ -20,6 +21,9 @@ export default function DhTemplateEnricher(match, _options) {
|
|||
);
|
||||
range = matchedRange?.id;
|
||||
break;
|
||||
case 'inline':
|
||||
inline = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -30,7 +34,7 @@ export default function DhTemplateEnricher(match, _options) {
|
|||
|
||||
const templateElement = document.createElement('span');
|
||||
templateElement.innerHTML = `
|
||||
<button class="measured-template-button" data-type="${type}" data-range="${range}">
|
||||
<button class="measured-template-button${inline ? ' inline' : ''}" data-type="${type}" data-range="${range}">
|
||||
${label} - ${game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.name`)}
|
||||
</button>
|
||||
`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue