Added Health Bar
This commit is contained in:
@@ -19,12 +19,12 @@
|
|||||||
</core-toolbar>
|
</core-toolbar>
|
||||||
<div fit>
|
<div fit>
|
||||||
<core-animated-pages id="tabPages" selected={{selectedTab}} transitions="slide-from-right" fit>
|
<core-animated-pages id="tabPages" selected={{selectedTab}} transitions="slide-from-right" fit>
|
||||||
<swipe-detect touch-action="pan-y" flex>{{> stats}}</swipe-detect>
|
<section flex>{{> stats}}</section>
|
||||||
<swipe-detect touch-action="pan-y" flex>{{> features}}</swipe-detect>
|
<section flex>{{> features}}</section>
|
||||||
<swipe-detect touch-action="pan-y" flex>{{> inventory}}</swipe-detect>
|
<section flex>{{> inventory}}</section>
|
||||||
<swipe-detect touch-action="pan-y" flex>{{> spells}}</swipe-detect>
|
<section flex>{{> spells}}</section>
|
||||||
<swipe-detect touch-action="pan-y" flex>{{> persona}}</swipe-detect>
|
<section flex>{{> persona}}</section>
|
||||||
<swipe-detect touch-action="pan-y" flex>{{> journal}}</swipe-detect>
|
<section flex>{{> journal}}</section>
|
||||||
</core-animated-pages>
|
</core-animated-pages>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -17,3 +17,17 @@
|
|||||||
.containerMain.featureDescription {
|
.containerMain.featureDescription {
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.resourceCards paper-shadow.healthCard {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 16px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.healthCard paper-slider{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hitPointSlider::shadow #sliderBar::shadow #activeProgress {
|
||||||
|
background-color: #0f9d58;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
<div fit>
|
<div fit>
|
||||||
<div class="scroll-y" fit>
|
<div class="scroll-y" fit>
|
||||||
<div class="resourceCards" layout horizontal wrap>
|
<div class="resourceCards" layout horizontal wrap>
|
||||||
|
<paper-shadow class="card container healthCard" hero-id="main" {{detailHero}} layout vertical>
|
||||||
|
<paper-slider id="hitPointSlider"
|
||||||
|
value={{attributeValue "hitPoints"}}
|
||||||
|
max={{attributeBase "hitPoints"}}
|
||||||
|
editable pin
|
||||||
|
role="slider"
|
||||||
|
></paper-slider>
|
||||||
|
</paper-shadow>
|
||||||
<!--Armor-->
|
<!--Armor-->
|
||||||
<paper-shadow class="card container statCard" hero-id="main" {{detailHero}} layout horizontal>
|
<paper-shadow class="card container statCard" hero-id="main" {{detailHero}} layout horizontal>
|
||||||
<div class="containerLeft">
|
<div class="containerLeft">
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ Template.features.events({
|
|||||||
"tap .resetFeature": function(event){
|
"tap .resetFeature": function(event){
|
||||||
var featureId = this._id;
|
var featureId = this._id;
|
||||||
Features.update(featureId, {$set: {used: 0}});
|
Features.update(featureId, {$set: {used: 0}});
|
||||||
|
},
|
||||||
|
"change #hitPointSlider": function(event){
|
||||||
|
var value = event.currentTarget.value;
|
||||||
|
var adjustment = value - this.attributeBase("hitPoints");
|
||||||
|
Characters.update(this._id, {$set: {"hitPoints.adjustment": adjustment}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
<link rel="import" href="/components/paper-item/paper-item.html">
|
<link rel="import" href="/components/paper-item/paper-item.html">
|
||||||
<link rel="import" href="/components/paper-menu-button/paper-menu-button.html">
|
<link rel="import" href="/components/paper-menu-button/paper-menu-button.html">
|
||||||
<link rel="import" href="/components/paper-shadow/paper-shadow.html">
|
<link rel="import" href="/components/paper-shadow/paper-shadow.html">
|
||||||
|
<link rel="import" href="/components/paper-slider-diff/paper-slider.html">
|
||||||
<link rel="import" href="/components/paper-spinner/paper-spinner.html">
|
<link rel="import" href="/components/paper-spinner/paper-spinner.html">
|
||||||
<link rel="import" href="/components/paper-tabs/paper-tabs.html">
|
<link rel="import" href="/components/paper-tabs/paper-tabs.html">
|
||||||
<link rel="import" href="/components/paper-toggle-button/paper-toggle-button.html">
|
<link rel="import" href="/components/paper-toggle-button/paper-toggle-button.html">
|
||||||
|
|||||||
Reference in New Issue
Block a user