Skip to content

Commit

Permalink
Fixing the Low HP/Dead Display (#92)
Browse files Browse the repository at this point in the history
* Fix name and HP colouring for low and 0 HP

* Safety on negative numbers

---------

Co-authored-by: Joshua Moon <[email protected]>
  • Loading branch information
benrick and Joshua Moon authored Feb 16, 2023
1 parent 1d4bb61 commit e343b42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/InteractiveSeven.Web/wwwroot/Status/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<span v-bind:class="'name ' + (data.stats.currentHp == 0? 'dead ' : '') + (data.stats.currentHp == 7777? 'rainbow ' : '')">{{data.name}}</span>
<span class="aqua">LV </span><span class="level">{{data.stats.level}}</span> <span class="status"></span>
<span class="status" v-if="data.stats.status.length > 0"> {{data.stats.status[data.statusIndex]}}</span><br />
<span class="aqua">HP </span><span v-bind:class="'current-hp ' + (data.stats.currentHp > 0 && data.stats.currentHp < data.stats.maxHp / 4? 'hp-low' : '')">{{data.stats.currentHp}}</span> / <span class="max-hp">{{data.stats.maxHp}}</span><br />
<span class="aqua">HP </span><span v-bind:class="'current-hp ' + (data.stats.currentHp > 0 && data.stats.currentHp < data.stats.maxHp / 4? 'hp-low' : '') + (data.stats.currentHp <= 0 ? 'dead ' : '')">{{data.stats.currentHp}}</span> / <span class="max-hp">{{data.stats.maxHp}}</span><br />
<span class="aqua">MP </span><span class="current-mp">{{data.stats.currentMp}}</span> / <span class="max-mp">{{data.stats.maxMp}}</span><br />
<div class="slide active-slide" v-if="slide === 'materia'">
<ul v-bind:class="'wpn slots ' + (data.weapon.growth === 0? 'no-growth' : '')">
Expand Down
8 changes: 4 additions & 4 deletions src/InteractiveSeven.Web/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
color: #c71585 !important;
}

.hp-low .current-hp, .mp-low:not(.dead) .current-mp {
color: #ffa500;
.hp-low:not(.dead), .mp-low:not(.dead) {
color: #ffa500 !important;
}


Expand Down Expand Up @@ -222,8 +222,8 @@
width: 60px;
}

.ff7 .text .character.dead * {
color: #ab0000;
.dead {
color: #ab0000 !important;
}

.ff7 {
Expand Down

0 comments on commit e343b42

Please sign in to comment.