From 18bea6420cd20f7801a3870bcb95420837a4fcb7 Mon Sep 17 00:00:00 2001 From: Chris Ryan Date: Fri, 16 Jan 2026 21:16:38 +1000 Subject: [PATCH] More dialog stuff --- lang/en.json | 2 +- module/applications/dialogs/riskItAllDialog.mjs | 5 ++++- templates/dialogs/riskItAllDialog.hbs | 12 +++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lang/en.json b/lang/en.json index bdd91cd5..82129bac 100755 --- a/lang/en.json +++ b/lang/en.json @@ -615,7 +615,7 @@ "rerollDice": "Reroll Dice" }, "RiskItAllDialog": { - "title": "{name} - Risk It All - Clear Stress and/or Hit Points", + "title": "Character: {name} - Risk It All - Clear Stress and/or Hit Points", "subtitle": "Clear {hope} Stress and/or Hit Points", "submit": "Submit" }, diff --git a/module/applications/dialogs/riskItAllDialog.mjs b/module/applications/dialogs/riskItAllDialog.mjs index bbde1279..fef76e66 100644 --- a/module/applications/dialogs/riskItAllDialog.mjs +++ b/module/applications/dialogs/riskItAllDialog.mjs @@ -9,7 +9,7 @@ export default class RiskItAllDialog extends HandlebarsApplicationMixin(Applicat } get title() { - return game.i18n.format('DAGGERHEART.APPLICATIONS.RiskItAllDialog.title', { actor: this.actor.name }); + return game.i18n.format('DAGGERHEART.APPLICATIONS.RiskItAllDialog.title', { name: this.actor.name }); } static DEFAULT_OPTIONS = { @@ -35,6 +35,9 @@ export default class RiskItAllDialog extends HandlebarsApplicationMixin(Applicat context.currentHitPointsLabel = "Current Marked Hit Points: " + this.actor.system.resources.hitPoints.value; context.currentStressLabel = "Current Marked Stress: " + this.actor.system.resources.stress.value; + context.newHitPoints = this.actor.system.resources.hitPoints.value; + context.newStress = this.actor.system.resources.stress.value; + return context; } diff --git a/templates/dialogs/riskItAllDialog.hbs b/templates/dialogs/riskItAllDialog.hbs index 09bf2f0d..9f494f58 100644 --- a/templates/dialogs/riskItAllDialog.hbs +++ b/templates/dialogs/riskItAllDialog.hbs @@ -6,12 +6,18 @@ Remaining points to use here.
-
{{currentHitPointsLabel}} - New HP field editor, initial value is current hit points +
+ New Hit Points Value + +
+ {{currentStressLabel}} - New Stress field editor, initial value is current hit points +
+ New Stress Value + +