mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-04-19 01:24:04 +02:00
Fixed alignment of the ability icons on the hud
This commit is contained in:
parent
d30b22c11c
commit
bff01ff787
6 changed files with 5 additions and 5 deletions
|
@ -79,9 +79,9 @@ class Slot {
|
|||
}
|
||||
|
||||
// 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
|
||||
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 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.SECONDARY, 26, -5, 3, 22, 17, 18).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.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, 19).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) {
|
||||
|
|
Binary file not shown.
Before ![]() (image error) Size: 754 B After ![]() (image error) Size: 715 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 998 B After ![]() (image error) Size: 1.1 KiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 621 B After ![]() (image error) Size: 656 B ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 802 B After ![]() (image error) Size: 768 B ![]() ![]() |
Loading…
Add table
Reference in a new issue