From 83186ec38a810a1bedf9f23f1a9a36226723a598 Mon Sep 17 00:00:00 2001 From: Thaum Date: Tue, 24 Feb 2015 13:40:50 +0000 Subject: [PATCH] Moved all stats to stats tab, implemented hit dice --- rpg-docs/client/views/GeneralCSS/general.css | 8 + .../client/views/GeneralCSS/globalDetail.css | 6 + .../Stats/abilityCards/abilityCards.html | 37 ++-- .../character/Stats/hitDice/hitDice.html | 24 +++ .../views/character/Stats/hitDice/hitDice.js | 25 +++ .../client/views/character/Stats/stats.html | 95 +++++++++- .../views/character/characterSheet.html | 2 +- .../views/character/features/features.css | 9 - .../views/character/features/features.html | 55 ++---- .../views/character/features/features.js | 12 +- .../views/character/healthBar/healthBar.css | 143 -------------- .../views/character/healthBar/healthBar.html | 52 ----- .../views/character/healthBar/healthBar.js | 177 ------------------ .../views/character/healthCard/healthCard.css | 25 +++ .../character/healthCard/healthCard.html | 15 ++ .../views/character/healthCard/healthCard.js | 7 + .../views/character/inventory/inventory.css | 16 +- .../personaDetailsDialog.html | 6 - .../persona/textDialog/textDialog.html | 6 - 19 files changed, 249 insertions(+), 471 deletions(-) create mode 100644 rpg-docs/client/views/character/Stats/hitDice/hitDice.html create mode 100644 rpg-docs/client/views/character/Stats/hitDice/hitDice.js delete mode 100644 rpg-docs/client/views/character/healthBar/healthBar.css delete mode 100644 rpg-docs/client/views/character/healthBar/healthBar.html delete mode 100644 rpg-docs/client/views/character/healthBar/healthBar.js create mode 100644 rpg-docs/client/views/character/healthCard/healthCard.css create mode 100644 rpg-docs/client/views/character/healthCard/healthCard.html create mode 100644 rpg-docs/client/views/character/healthCard/healthCard.js diff --git a/rpg-docs/client/views/GeneralCSS/general.css b/rpg-docs/client/views/GeneralCSS/general.css index b72f967d..8fd32771 100644 --- a/rpg-docs/client/views/GeneralCSS/general.css +++ b/rpg-docs/client/views/GeneralCSS/general.css @@ -172,3 +172,11 @@ paper-fab-menu /deep/ .container { .fullwidth { width: 100%; } + +.padded { + padding: 16px; +} + +.leftRound{ + border-radius: 2px 0 0 2px; +} diff --git a/rpg-docs/client/views/GeneralCSS/globalDetail.css b/rpg-docs/client/views/GeneralCSS/globalDetail.css index 0a93d6ed..850317fa 100644 --- a/rpg-docs/client/views/GeneralCSS/globalDetail.css +++ b/rpg-docs/client/views/GeneralCSS/globalDetail.css @@ -46,6 +46,12 @@ border-radius: 2px 2px 0 0; } +@media (max-width: 640px) { + #globalDetail core-toolbar { + border-radius: 0; + } +} + @media (max-width: 640px) { #globalDetail { top: 0 !important; diff --git a/rpg-docs/client/views/character/Stats/abilityCards/abilityCards.html b/rpg-docs/client/views/character/Stats/abilityCards/abilityCards.html index 4ecc87cd..0522fca5 100644 --- a/rpg-docs/client/views/character/Stats/abilityCards/abilityCards.html +++ b/rpg-docs/client/views/character/Stats/abilityCards/abilityCards.html @@ -1,10 +1,14 @@ - - - \ No newline at end of file diff --git a/rpg-docs/client/views/character/Stats/hitDice/hitDice.html b/rpg-docs/client/views/character/Stats/hitDice/hitDice.html new file mode 100644 index 00000000..7740adde --- /dev/null +++ b/rpg-docs/client/views/character/Stats/hitDice/hitDice.html @@ -0,0 +1,24 @@ + diff --git a/rpg-docs/client/views/character/Stats/hitDice/hitDice.js b/rpg-docs/client/views/character/Stats/hitDice/hitDice.js new file mode 100644 index 00000000..632fbf0d --- /dev/null +++ b/rpg-docs/client/views/character/Stats/hitDice/hitDice.js @@ -0,0 +1,25 @@ +Template.hitDice.helpers({ + cantIncrement: function(){ + return !(this.char.attributeValue(this.name) < this.char.attributeBase(this.name)); + }, + cantDecrement: function(){ + return !(this.char.attributeValue(this.name) > 0); + } +}); + +Template.hitDice.events({ + "tap .resourceUp": function(event){ + if(this.char.attributeValue(this.name) < this.char.attributeBase(this.name)){ + var modifier = {$inc: {}}; + modifier.$inc[this.name + ".adjustment"] = 1; + Characters.update(this.char._id, modifier, {validate: false}); + } + }, + "tap .resourceDown": function(event){ + if(this.char.attributeValue(this.name) > 0){ + var modifier = {$inc: {}}; + modifier.$inc[this.name + ".adjustment"] = -1; + Characters.update(this.char._id, modifier, {validate: false}); + } + } +}); diff --git a/rpg-docs/client/views/character/Stats/stats.html b/rpg-docs/client/views/character/Stats/stats.html index b85a49a0..8f07f03d 100644 --- a/rpg-docs/client/views/character/Stats/stats.html +++ b/rpg-docs/client/views/character/Stats/stats.html @@ -1,7 +1,100 @@ diff --git a/rpg-docs/client/views/character/characterSheet.html b/rpg-docs/client/views/character/characterSheet.html index d8e58d41..e523d379 100644 --- a/rpg-docs/client/views/character/characterSheet.html +++ b/rpg-docs/client/views/character/characterSheet.html @@ -11,7 +11,7 @@ Stats Features Inventory - Spellbook + Spells Persona Journal diff --git a/rpg-docs/client/views/character/features/features.css b/rpg-docs/client/views/character/features/features.css index 6fd9cc19..3db8f419 100644 --- a/rpg-docs/client/views/character/features/features.css +++ b/rpg-docs/client/views/character/features/features.css @@ -22,12 +22,3 @@ 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 6491b5e0..e5d7e65e 100644 --- a/rpg-docs/client/views/character/features/features.html +++ b/rpg-docs/client/views/character/features/features.html @@ -1,49 +1,18 @@