More dialog stuff

This commit is contained in:
Chris Ryan 2026-01-16 21:16:38 +10:00
parent 6ea09551fe
commit 18bea6420c
3 changed files with 14 additions and 5 deletions

View file

@ -615,7 +615,7 @@
"rerollDice": "Reroll Dice" "rerollDice": "Reroll Dice"
}, },
"RiskItAllDialog": { "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", "subtitle": "Clear {hope} Stress and/or Hit Points",
"submit": "Submit" "submit": "Submit"
}, },

View file

@ -9,7 +9,7 @@ export default class RiskItAllDialog extends HandlebarsApplicationMixin(Applicat
} }
get title() { 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 = { 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.currentHitPointsLabel = "Current Marked Hit Points: " + this.actor.system.resources.hitPoints.value;
context.currentStressLabel = "Current Marked Stress: " + this.actor.system.resources.stress.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; return context;
} }

View file

@ -6,12 +6,18 @@
<span>Remaining points to use here.</span> <span>Remaining points to use here.</span>
</div> </div>
<div class="risk-it-all-container"> <div class="risk-it-all-container">
<div class="two-columns even"> <div class="two-columns even">
<span>{{currentHitPointsLabel}}</span> <span>{{currentHitPointsLabel}}</span>
<span>New HP field editor, initial value is current hit points</span> <div>
<span>New Hit Points Value</span>
<input type="text" data-dtype="Number" name="newHitPoints" value="{{newHitPoints}}" />
</div>
<span>{{currentStressLabel}}</span> <span>{{currentStressLabel}}</span>
<span>New Stress field editor, initial value is current hit points</span> <div>
<span>New Stress Value</span>
<input type="text" data-dtype="Number" name="newStress" value="{{newStress}}" />
</div>
</div> </div>
</div> </div>
<footer class="flexrow"> <footer class="flexrow">