Adjust icon size and positioning in the main ability slot

This commit is contained in:
Sollace 2023-11-09 23:41:30 +00:00
parent 3948bf4a58
commit e49828fea1
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,7 @@ import net.minecraft.client.util.math.MatrixStack;
class ManaRingSlot extends Slot { class ManaRingSlot extends Slot {
public ManaRingSlot(UHud uHud, AbilitySlot normalSlot, AbilitySlot backupSlot, int x, int y) { public ManaRingSlot(UHud uHud, AbilitySlot normalSlot, AbilitySlot backupSlot, int x, int y) {
super(uHud, normalSlot, backupSlot, x, y, 8, UHud.PRIMARY_SLOT_SIZE, 33, 43, 42); super(uHud, normalSlot, backupSlot, x, y, 8, UHud.PRIMARY_SLOT_SIZE, 33, 43, 30);
background(0, 5); background(0, 5);
foreground(0, 59); foreground(0, 59);
} }

View file

@ -93,8 +93,9 @@ class Slot {
AbilityDispatcher.Stat stat = abilities.getStat(bSwap ? bSlot : aSlot); AbilityDispatcher.Stat stat = abilities.getStat(bSwap ? bSlot : aSlot);
int iconPosition = ((size - iconSize + slotPadding + 1) / 2);
int sz = iconSize - slotPadding; int sz = iconSize - slotPadding;
uHud.renderAbilityIcon(context, stat, slotPadding, slotPadding, sz, sz, sz, sz); uHud.renderAbilityIcon(context, stat, iconPosition, iconPosition, sz, sz, sz, sz);
float cooldown = stat.getFillProgress(); float cooldown = stat.getFillProgress();