diff --git a/lang/en.json b/lang/en.json index a472b40e..c02898f0 100755 --- a/lang/en.json +++ b/lang/en.json @@ -293,6 +293,7 @@ "usedMarks": "Used Marks" }, "DeathMove": { + "selectMove": "Select Move", "takeMove": "Take Death Move", "title": "{actor} - Death Move" }, diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index 735c3c18..093d9680 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -13,8 +13,9 @@ export default class DhpDeathMove extends HandlebarsApplicationMixin(Application } static DEFAULT_OPTIONS = { - classes: ['daggerheart', 'views', 'death-move'], - position: { width: 800, height: 'auto' }, + classes: ['daggerheart', 'dh-style', 'dialog', 'views', 'death-move'], + position: { width: 'auto', height: 'auto' }, + window: { icon: 'fa-solid fa-skull' }, actions: { selectMove: this.selectMove, takeMove: this.takeMove @@ -32,6 +33,7 @@ export default class DhpDeathMove extends HandlebarsApplicationMixin(Application const context = await super._prepareContext(_options); context.selectedMove = this.selectedMove; context.options = CONFIG.DH.GENERAL.deathMoves; + context.title = game.i18n.localize('DAGGERHEART.APPLICATIONS.DeathMove.takeMove'); return context; } diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 6781dc83..7e44cad7 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -322,18 +322,21 @@ export const deathMoves = { id: 'avoidDeath', name: 'DAGGERHEART.CONFIG.DeathMoves.avoidDeath.name', img: 'icons/magic/time/hourglass-yellow-green.webp', + icon: 'fa-person-running', description: 'DAGGERHEART.CONFIG.DeathMoves.avoidDeath.description' }, riskItAll: { id: 'riskItAll', name: 'DAGGERHEART.CONFIG.DeathMoves.riskItAll.name', img: 'icons/sundries/gaming/dice-pair-white-green.webp', + icon: 'fa-dice', description: 'DAGGERHEART.CONFIG.DeathMoves.riskItAll.description' }, blazeOfGlory: { id: 'blazeOfGlory', name: 'DAGGERHEART.CONFIG.DeathMoves.blazeOfGlory.name', img: 'icons/magic/life/heart-cross-strong-flame-purple-orange.webp', + icon: 'fa-burst', description: 'DAGGERHEART.CONFIG.DeathMoves.blazeOfGlory.description' } }; diff --git a/module/documents/tooltipManager.mjs b/module/documents/tooltipManager.mjs index f685c8a6..974f5596 100644 --- a/module/documents/tooltipManager.mjs +++ b/module/documents/tooltipManager.mjs @@ -87,6 +87,26 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti this.tooltip.innerHTML = html; } } + + const deathMove = element.dataset.tooltip?.startsWith('#deathMove#'); + if (deathMove) { + const name = element.dataset.deathName; + const img = element.dataset.deathImg; + const description = element.dataset.deathDescription; + + html = await foundry.applications.handlebars.renderTemplate( + `systems/daggerheart/templates/ui/tooltip/death-move.hbs`, + { + move: { name: name, img: img, description: description } + } + ); + + this.tooltip.innerHTML = html; + options.direction = this._determineItemTooltipDirection( + element, + this.constructor.TOOLTIP_DIRECTIONS.RIGHT + ); + } } super.activate(element, { ...options, html: html }); diff --git a/styles/less/dialog/actions/action-list.less b/styles/less/dialog/actions/action-list.less index 4011d124..6a899ca7 100644 --- a/styles/less/dialog/actions/action-list.less +++ b/styles/less/dialog/actions/action-list.less @@ -1,4 +1,5 @@ @import '../../utils/fonts.less'; +@import '../../utils/colors.less'; .application.daggerheart.dh-style { .actions-list, @@ -36,7 +37,8 @@ .action-item { &:hover { - background-color: rgba(255, 255, 255, 0.05); + background-color: light-dark(@soft-shadow, @soft-white-shadow); + cursor: pointer; } padding: 5px; border-radius: 5px; @@ -47,7 +49,6 @@ align-items: center; gap: 10px; font-family: @font-body; - cursor: pointer; flex: 1; i { text-align: center; diff --git a/styles/less/dialog/death-move/death-move-container.less b/styles/less/dialog/death-move/death-move-container.less new file mode 100644 index 00000000..d5982131 --- /dev/null +++ b/styles/less/dialog/death-move/death-move-container.less @@ -0,0 +1,57 @@ +@import '../../utils/spacing.less'; +@import '../../utils/colors.less'; +@import '../../utils/fonts.less'; + +.daggerheart.dh-style.dialog.death-move { + .death-move-container { + display: flex; + flex-direction: column; + gap: 5px; + + .moves-list { + .move-item { + display: flex; + align-items: center; + gap: 5px; + + &:hover { + background-color: light-dark(@soft-shadow, @soft-white-shadow); + cursor: pointer; + } + padding: 5px; + border-radius: 5px; + transition: background-color 0.3s ease-in-out; + + .label { + display: flex; + align-items: center; + gap: 10px; + font-family: @font-body; + cursor: pointer; + flex: 1; + i { + text-align: center; + width: 30px; + } + } + + input[type='radio'] { + margin-left: auto; + } + } + } + } + + footer { + margin-top: 8px; + display: flex; + gap: 8px; + + button { + flex: 1; + height: 40px; + font-family: @font-body; + font-weight: 600; + } + } +} diff --git a/styles/less/dialog/downtime/downtime-container.less b/styles/less/dialog/downtime/downtime-container.less index 0f803d9b..6a520d4b 100644 --- a/styles/less/dialog/downtime/downtime-container.less +++ b/styles/less/dialog/downtime/downtime-container.less @@ -1,5 +1,6 @@ @import '../../utils/spacing.less'; @import '../../utils/colors.less'; +@import '../../utils/fonts.less'; .theme-light .daggerheart.dh-style.views.downtime { .downtime-container .activity-container .activity-selected-marker { @@ -69,7 +70,9 @@ button { flex: 1; - font-family: 'Montserrat', sans-serif; + height: 40px; + font-family: @font-body; + font-weight: 600; } } } diff --git a/styles/less/dialog/index.less b/styles/less/dialog/index.less index 66fd981d..496d09e9 100644 --- a/styles/less/dialog/index.less +++ b/styles/less/dialog/index.less @@ -12,6 +12,8 @@ @import './downtime/downtime-container.less'; +@import './death-move/death-move-container.less'; + @import './beastform/sheet.less'; @import './character-creation/creation-action-footer.less'; diff --git a/styles/less/utils/colors.less b/styles/less/utils/colors.less index 622480a7..033a42cb 100755 --- a/styles/less/utils/colors.less +++ b/styles/less/utils/colors.less @@ -38,6 +38,8 @@ @beige-15: #efe6d815; @beige-50: #efe6d850; +@soft-white-shadow: rgba(255, 255, 255, 0.05); + @light-black: rgba(0, 0, 0, 0.3); @soft-shadow: rgba(0, 0, 0, 0.05); diff --git a/templates/dialogs/deathMove.hbs b/templates/dialogs/deathMove.hbs index 1747a340..d2307900 100644 --- a/templates/dialogs/deathMove.hbs +++ b/templates/dialogs/deathMove.hbs @@ -1,19 +1,22 @@