Skip to content

Commit

Permalink
panel.js: Make E: indicator red if energy is low.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmkG committed Jun 22, 2014
1 parent 61a2eb3 commit 743680c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ Panel.prototype.render = function () {
this._v.innerHTML = engines;
this._k.innerHTML = vars.kills;
this._e.innerHTML = vars.energy;
if (vars.energy.toString().charAt(0) === '0') {
this._e.style.backgroundColor = "red";
} else {
this._e.style.backgroundColor = "transparent";
}
this._t.innerHTML = computer.instruments.panelT();
this._y.innerHTML = computer.instruments.panelY();
this._x.innerHTML = computer.instruments.panelX();
Expand Down

0 comments on commit 743680c

Please sign in to comment.