Correct position of spell cooldown bar when spell HUD is at top of screen; fixes #14

This commit is contained in:
Electroblob
2018-04-14 13:22:53 +01:00
parent 6b9c864890
commit 2cbb0a590f
@@ -135,11 +135,11 @@ public class GuiSpellDisplay extends Gui {
// Cooldown bar
if(cooldown > 0){
this.drawTexturedModalRect(mirror ? left + 5 : left + 41, height - 8, 128, 6, 82, 6);
this.drawTexturedModalRect(mirror ? left + 5 : left + 41, top + 28, 128, 6, 82, 6);
int l = (int)(((double)(spell.cooldown * cooldownMultiplier - cooldown) / (double)(spell.cooldown * cooldownMultiplier)) * 82);
this.drawTexturedModalRect(mirror ? left + 5 : left + 41, height - 8, 128, 0, l, 6);
this.drawTexturedModalRect(mirror ? left + 5 : left + 41, top + 28, 128, 0, l, 6);
}
// Spell illustration