Quick allocation of attribute points from level-up modal

Resolves #6720.
This commit is contained in:
Josh Holland
2016-02-20 21:07:00 +00:00
committed by Blade Barringer
parent a150dbc9ca
commit 952d9ec929
2 changed files with 23 additions and 1 deletions
+3 -1
View File
@@ -160,5 +160,7 @@
"str": "STR",
"con": "CON",
"per": "PER",
"int": "INT"
"int": "INT",
"showHideQuickAllocation": "Show/hide stat allocation",
"quickAllocationLevelPopover": "Each level earns you one point to assign to an attribute of your choice. You can do so manually, or let the game decide for you using one of the Automatic Allocation options found in User -> Stats."
}
+20
View File
@@ -16,6 +16,26 @@ script(type='text/ng-template', id='modals/levelUp.html')
h4(style='margin-top: 1em')!=env.t('leveledUp', {level:'{{user.stats.lvl}}'})
p=env.t('fullyHealed')
br
div(ng-if='user.flags.classSelected && !user.preferences.disableClasses && !user.preferences.automaticAllocation')
a.btn.btn-default(data-toggle='collapse', data-target='#stat-allocation', aria-expanded=false, aria-controls='stat-allocation')=env.t('showHideQuickAllocation')
p  
div.collapse#stat-allocation
table.table.text-left
tr
td
p(ng-if='::user.stats.lvl >= 100')!=env.t('noMoreAllocate')
p(ng-if='user.stats.points || user.stats.lvl < 100')
strong.inline
| {{user.stats.points}}&nbsp;
strong.hint(popover-trigger='mouseenter', popover-placement='right', popover=env.t('quickAllocationLevelPopover'))=env.t('unallocated')
td
each statInfo, stat in { str: {title:"allocateStr",popover:'strengthText',allocatepop:'allocateStrPop'},int: {title:"allocateInt",popover:'intText',allocatepop:'allocateIntPop'},con: {title:"allocateCon",popover:'conText',allocatepop:'allocateConPop'},per: {title:"allocatePer",popover:'perText',allocatepop:'allocatePerPop'} }
tr
td
span.hint(popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.popover))
=env.t(statInfo.title) + ' {{user.stats.' + stat + '}}'
td
a.btn.btn-primary(ng-show='user.stats.points', ng-click='allocate("#{stat}")', popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.allocatepop)) +
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
.checkbox
label(style='display:inline-block')=env.t('dontShowAgain')