Skip to content

Commit

Permalink
Merge pull request #6 from yukimono/patch-1
Browse files Browse the repository at this point in the history
SpellTimer オーバーレイで、Warning point in seconds で設定した秒に達したらバーを赤くするように変更。
  • Loading branch information
RainbowMage committed Jan 17, 2015
2 parents f924ea4 + 3e458e0 commit 45c3f65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OverlayPlugin/resources/spelltimer.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@

var percentage = Math.max(0, Math.min(1, this.spellTimer.getRemaining() / this.spellTimer.startCount)) * 100;
barDiv.style.width = percentage.toFixed(2) + "%";

setTimeout(function(barDiv) {
barDiv.style.backgroundColor = "#FF0000";
}, Math.max(0, (this.spellTimer.getRemaining() - this.spellTimer.warningCount) * 1000), barDiv);

$(barDiv).animate(
{ width: "0%" },
Expand Down Expand Up @@ -458,4 +462,4 @@
</div>

</body>
</html>
</html>

0 comments on commit 45c3f65

Please sign in to comment.