From 08f02d9b3663620231c968010b616d7c4500d653 Mon Sep 17 00:00:00 2001 From: Thaum Date: Fri, 20 Feb 2015 11:26:54 +0000 Subject: [PATCH] Added Health Bar --- .../client/views/character/characterSheet.html | 12 ++++++------ .../client/views/character/features/features.css | 14 ++++++++++++++ .../client/views/character/features/features.html | 8 ++++++++ .../client/views/character/features/features.js | 5 +++++ rpg-docs/client/views/layout/imports.html | 1 + 5 files changed, 34 insertions(+), 6 deletions(-) diff --git a/rpg-docs/client/views/character/characterSheet.html b/rpg-docs/client/views/character/characterSheet.html index 07f8c939..d8e58d41 100644 --- a/rpg-docs/client/views/character/characterSheet.html +++ b/rpg-docs/client/views/character/characterSheet.html @@ -19,12 +19,12 @@
- {{> stats}} - {{> features}} - {{> inventory}} - {{> spells}} - {{> persona}} - {{> journal}} +
{{> stats}}
+
{{> features}}
+
{{> inventory}}
+
{{> spells}}
+
{{> persona}}
+
{{> journal}}
diff --git a/rpg-docs/client/views/character/features/features.css b/rpg-docs/client/views/character/features/features.css index 5e44d371..6fd9cc19 100644 --- a/rpg-docs/client/views/character/features/features.css +++ b/rpg-docs/client/views/character/features/features.css @@ -17,3 +17,17 @@ .containerMain.featureDescription { 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; +} diff --git a/rpg-docs/client/views/character/features/features.html b/rpg-docs/client/views/character/features/features.html index 5398491e..6491b5e0 100644 --- a/rpg-docs/client/views/character/features/features.html +++ b/rpg-docs/client/views/character/features/features.html @@ -2,6 +2,14 @@
+ + +
diff --git a/rpg-docs/client/views/character/features/features.js b/rpg-docs/client/views/character/features/features.js index 85816166..46250404 100644 --- a/rpg-docs/client/views/character/features/features.js +++ b/rpg-docs/client/views/character/features/features.js @@ -39,6 +39,11 @@ Template.features.events({ "tap .resetFeature": function(event){ var featureId = this._id; 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}}); } }); diff --git a/rpg-docs/client/views/layout/imports.html b/rpg-docs/client/views/layout/imports.html index b17c5f30..85bf3772 100644 --- a/rpg-docs/client/views/layout/imports.html +++ b/rpg-docs/client/views/layout/imports.html @@ -29,6 +29,7 @@ +