mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed ability icons on the hud
This commit is contained in:
parent
10c4169742
commit
3cee5fa5a3
5 changed files with 3 additions and 4 deletions
|
@ -49,8 +49,6 @@ public class UHud extends DrawableHelper {
|
|||
|
||||
AbilityDispatcher.Stat stat = abilities.getStat(AbilitySlot.PRIMARY);
|
||||
|
||||
//renderAbilityIcon(stat, x, y, 0, 0, frameWidth, frameHeight);
|
||||
|
||||
float progressPercent = stat.getFillProgress();
|
||||
|
||||
if (progressPercent > 0 && progressPercent < 1) {
|
||||
|
@ -61,6 +59,7 @@ public class UHud extends DrawableHelper {
|
|||
frameWidth, progressHeight, 128, 128); // progress
|
||||
}
|
||||
|
||||
renderAbilityIcon(stat, x + 9, y + 15, 32, 32, 32, 32);
|
||||
blit(x, y, 0, 54, frameWidth, frameHeight, 128, 128); // frame
|
||||
|
||||
secondarySlot.render(abilities, x, y, tickDelta);
|
||||
|
@ -103,7 +102,6 @@ public class UHud extends DrawableHelper {
|
|||
float cooldown = stat.getFillProgress();
|
||||
|
||||
blit(x, y, 80, 105, 25, 25, 128, 128);
|
||||
renderAbilityIcon(stat, x + 1, y + 1, 20, 20, 20, 20);
|
||||
|
||||
if (cooldown > 0 && cooldown < 1) {
|
||||
float lerpCooldown = MathHelper.lerp(tickDelta, cooldown, lastCooldown);
|
||||
|
@ -116,11 +114,12 @@ public class UHud extends DrawableHelper {
|
|||
int progressBottom = y + slotPadding + slotSize;
|
||||
int progressTop = progressBottom - (int)(15F * cooldown);
|
||||
|
||||
fill(x + slotPadding, progressTop, x + slotPadding + slotSize, progressBottom, 0x88FFFFFF);
|
||||
fill(x + slotPadding, progressTop, x + slotPadding + slotSize, progressBottom, 0xFFFFFFFF);
|
||||
RenderSystem.enableAlphaTest();
|
||||
RenderSystem.enableBlend();
|
||||
}
|
||||
|
||||
renderAbilityIcon(stat, x + 2, y + 2, 20, 20, 20, 20);
|
||||
blit(x, y, 105, 105, 25, 25, 128, 128);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 613 B After Width: | Height: | Size: 728 B |
BIN
src/main/resources/assets/unicopia/textures/gui/ability/grow.png
Normal file
BIN
src/main/resources/assets/unicopia/textures/gui/ability/grow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 701 B |
Binary file not shown.
After Width: | Height: | Size: 690 B |
Binary file not shown.
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 793 B |
Loading…
Reference in a new issue