Fixed alignment of the ability icons on the hud
|
@ -79,9 +79,9 @@ class Slot {
|
||||||
}
|
}
|
||||||
|
|
||||||
// contents
|
// contents
|
||||||
int middle = (slotPadding + size - iconSize)/2;
|
//int middle = (slotPadding + size - iconSize)/2;
|
||||||
|
|
||||||
uHud.renderAbilityIcon(matrices, stat, middle, middle, iconSize, iconSize, iconSize, iconSize);
|
uHud.renderAbilityIcon(matrices, stat, slotPadding / 2, slotPadding / 2, iconSize, iconSize, iconSize, iconSize);
|
||||||
|
|
||||||
// foreground
|
// foreground
|
||||||
UHud.drawTexture(matrices, 0, 0, backgroundU, backgroundV, size, size, 128, 128);
|
UHud.drawTexture(matrices, 0, 0, backgroundU, backgroundV, size, size, 128, 128);
|
||||||
|
|
|
@ -28,9 +28,9 @@ public class UHud extends DrawableHelper {
|
||||||
private final MinecraftClient client = MinecraftClient.getInstance();
|
private final MinecraftClient client = MinecraftClient.getInstance();
|
||||||
|
|
||||||
private final List<Slot> slots = Util.make(new ArrayList<>(), slots -> {
|
private final List<Slot> slots = Util.make(new ArrayList<>(), slots -> {
|
||||||
slots.add(new Slot(this, AbilitySlot.PRIMARY, 0, 0, 8, 49, 38, 24).background(0, 5).foreground(0, 59));
|
slots.add(new Slot(this, AbilitySlot.PRIMARY, 0, 0, 8, 49, 38, 42).background(0, 5).foreground(0, 59));
|
||||||
slots.add(new Slot(this, AbilitySlot.SECONDARY, 26, -5, 3, 22, 17, 18).background(80, 105));
|
slots.add(new Slot(this, AbilitySlot.SECONDARY, 26, -5, 3, 22, 17, 19).background(80, 105));
|
||||||
slots.add(new Slot(this, AbilitySlot.TERTIARY, 36, 19, 3, 22, 17, 18).background(80, 105));
|
slots.add(new Slot(this, AbilitySlot.TERTIARY, 36, 19, 3, 22, 17, 19).background(80, 105));
|
||||||
});
|
});
|
||||||
|
|
||||||
public void render(InGameHud hud, MatrixStack matrices, float tickDelta) {
|
public void render(InGameHud hud, MatrixStack matrices, float tickDelta) {
|
||||||
|
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 768 B |