mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-07 13:24:16 +02:00
Redesign group roll dialog
This commit is contained in:
parent
545934aa60
commit
89c02faf0e
17 changed files with 486 additions and 632 deletions
9
templates/dialogs/groupRollDialog/parts/footer.hbs
Normal file
9
templates/dialogs/groupRollDialog/parts/footer.hbs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<section class="tab {{#if tabs.groupRoll.active}} active{{/if}}" data-group="{{tabs.groupRoll.group}}" data-tab="{{tabs.groupRoll.id}}">
|
||||
<div class="finish-container">
|
||||
<button type="button" data-action="cancelRoll">{{localize "COMMON.Cancel"}}</button>
|
||||
<button type="button" data-action="finishRoll" {{#unless canFinishRoll}}disabled{{/unless}} class="finish-button">
|
||||
<i class="fa-solid fa-dice" inert></i>
|
||||
{{localize "DAGGERHEART.APPLICATIONS.GroupRollSelect.finishGroupRoll"}}
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
53
templates/dialogs/groupRollDialog/parts/member.hbs
Normal file
53
templates/dialogs/groupRollDialog/parts/member.hbs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{{#with (ifThen (eq partId "leader") leader (lookup members partId))}}
|
||||
<section class="member-roll-container {{type}} {{#if @root.allHaveRolled}}select-padding{{/if}} {{#unless isEditable}}inactive{{/unless}}" data-member-key="{{@root.partId}}">
|
||||
{{log this}}
|
||||
{{log @root}}
|
||||
<img class="portrait" src="{{img}}" />
|
||||
<div class="name-area">
|
||||
<span class="name">{{name}}</span>
|
||||
{{#if hasRolled}}
|
||||
<div class="trait item-tags">
|
||||
<div class="tag">{{rollChoiceLabel}}</div>
|
||||
</div>
|
||||
{{else if readyToRoll}}
|
||||
<div class="trait">
|
||||
Trait
|
||||
<select name="{{basePath}}.rollChoice" {{#if hasRolled}}disabled{{/if}}>
|
||||
{{selectOptions ../traitOptions selected=rollChoice localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if roll}}
|
||||
<div class="roll-data with-result {{#if roll.withHope}}hope{{else if roll.withFear}}fear{{else}}critical{{/if}}">
|
||||
<div class="duality-label">
|
||||
{{roll.total}}
|
||||
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.totalLabel}}</span>
|
||||
</div>
|
||||
<div class="roll-dice-container">
|
||||
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope">
|
||||
<span class="dice-label">{{roll.dHope.total}}</span>
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" roll.dHope.denomination ".svg"}}" />
|
||||
</a>
|
||||
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="fear">
|
||||
<span class="dice-label">{{roll.dFear.total}}</span>
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/fear/" roll.dFear.denomination ".svg"}}" />
|
||||
</a>
|
||||
{{#if roll.advantage.type}}
|
||||
<span class="roll-operator">{{#if (eq roll.advantage.type 1)}}+{{else}}-{{/if}}</span>
|
||||
<span class="roll-dice">
|
||||
<span class="dice-label">{{roll.advantage.value}}</span>
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/" (ifThen (eq roll.advantage.type 1) "adv/" "disadv/") roll.advantage.dice ".svg"}}" />
|
||||
</span>
|
||||
{{/if}}
|
||||
<span class="roll-operator">{{#if (gte roll.modifierTotal 0)}}+{{else}}-{{/if}}</span>
|
||||
<span class="roll-value">{{positive roll.modifierTotal}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else if readyToRoll}}
|
||||
<a class="roll-button initial-roll" data-action="makeRoll" data-member="{{@root.partId}}">
|
||||
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
|
||||
</a>
|
||||
{{/if}}
|
||||
</section>
|
||||
{{/with}}
|
||||
29
templates/dialogs/groupRollDialog/parts/result.hbs
Normal file
29
templates/dialogs/groupRollDialog/parts/result.hbs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
{{#if hasRolled}}
|
||||
<div class="group-roll-results with-result {{groupRoll.totalDualityClass}}">
|
||||
<div class="row leader">
|
||||
<span class="label">Leader Roll</span>
|
||||
<span class="duality-label">
|
||||
{{leader.roll.total}}
|
||||
<span class="with">{{localize "DAGGERHEART.GENERAL.withThing" thing=leader.roll.totalLabel}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="row modifiers">
|
||||
<span class="label">Modifiers</span>
|
||||
<div class="item-tags">
|
||||
{{#each groupRoll.modifiers as |modifier|}}
|
||||
<span class="tag">{{#if (gte modifier 0)}}+{{else}}-{{/if}}{{positive modifier}}</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="row total">
|
||||
<span class="label">Total</span>
|
||||
<span class="duality-label"><span class="value">{{groupRoll.total}}</span> {{groupRoll.totalLabel}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="group-roll-results empty">
|
||||
Results will appear when characters roll
|
||||
</div>
|
||||
{{/if}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue