Skip to content

Commit

Permalink
Adjust hud overlay positions
Browse files Browse the repository at this point in the history
  • Loading branch information
stal111 committed Sep 16, 2023
1 parent 20e6667 commit 5fc6fbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void render(ForgeGui gui, GuiGraphics guiGraphics, float partialTick, int
}
IAureal aureal = AurealHelper.getCapability(player);

guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 + 10, window.getGuiScaledHeight() - 25 - 23, 18, 9, 81, 9, 256, 128);
guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 + 10, window.getGuiScaledHeight() - 25 - 24, 18, 9, 81, 9, 256, 128);

this.renderOverlay(guiGraphics, window, aureal);
}
Expand All @@ -39,7 +39,7 @@ private void renderOverlay(GuiGraphics guiGraphics, Window window, IAureal aurea
int xSize = Math.toIntExact(Math.round(BAR_WIDTH * ((aureal.getAureal()) / 200.0F)));
int startOffset = BAR_WIDTH - xSize;

guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 + 13 + startOffset, window.getGuiScaledHeight() - 25 - 22, 21 + startOffset, 19, xSize, 7, 256, 128);
guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 + 13 + startOffset, window.getGuiScaledHeight() - 25 - 23, 21 + startOffset, 19, xSize, 7, 256, 128);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ public void render(ForgeGui gui, GuiGraphics guiGraphics, float partialTicks, in

IAureal aureal = AurealHelper.getCapability(player);

guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 - 9, window.getGuiScaledHeight() - 39 - 13, 0, 0, 18, 18, 256, 128);
guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 - 9, window.getGuiScaledHeight() - 39 - 16, 0, 0, 18, 18, 256, 128);

this.renderOverlay(guiGraphics, window, aureal, false);
this.renderOverlay(guiGraphics, window, aureal, true);
}

private void renderOverlay(GuiGraphics guiGraphics, Window window, IAureal aureal, boolean corruption) {
int ySize = Math.toIntExact(Math.round(12.0F * (corruption ? aureal.getCorruption() / 100.0F : aureal.getAureal() / 200.0F)));
guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 - 9, window.getGuiScaledHeight() - 36 - ySize, 0, (corruption ? 51 : 38) - 4 - ySize, 18, ySize, 256, 128);
guiGraphics.blit(TEXTURE, window.getGuiScaledWidth() / 2 - 9, window.getGuiScaledHeight() - 39 - ySize, 0, (corruption ? 51 : 38) - 4 - ySize, 18, ySize, 256, 128);
}
}

0 comments on commit 5fc6fbe

Please sign in to comment.