Skip to content

Commit

Permalink
Fix GUI alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahwinsley committed Jan 14, 2023
1 parent d496e83 commit ae67838
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public ItemStack quickMoveStack(Player playerIn, int index) {

public void registerHandlerSlots(IItemHandler handler) {
int index = 0;
addSlot(new FilteredSlot(handler, index++, 116, 53, stack -> stack.getItem() instanceof UpgradeItem));
addSlot(new FilteredSlot(handler, index++, 116, 54, stack -> stack.getItem() instanceof UpgradeItem));
if (enableMeshSlot) {
addSlot(new FilteredSlot(handler, index++, 80, 36, ExNihiloAPI::isMeshItem));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, i

// render work status texture
if (this.menu.getWorkStatus() == WorkStatus.WORKING) {
this.blit(matrixStack, relX + 116, relY + 35, 224, 0, 16, 16);
this.blit(matrixStack, relX + 116, relY + 36, 224, 0, 16, 16);
} else if(this.menu.getWorkStatus() == WorkStatus.REDSTONE_DISABLED) {
this.blit(matrixStack, relX + 116, relY + 35, 240, 0, 16, 16);
this.blit(matrixStack, relX + 116, relY + 36, 240, 0, 16, 16);
} else {
this.blit(matrixStack, relX + 116, relY + 35, 208, 0, 16, 16);
this.blit(matrixStack, relX + 116, relY + 36, 208, 0, 16, 16);
}

// texture offset - addon texture

float energyFraction = this.menu.dataHolder.getEnergyFraction();
var energyHolder = new TextureHolder(152, 17, 176, 0, 16, 52);
var energyHolder = new TextureHolder(152, 18, 176, 0, 16, 52);
blit(matrixStack,
relX + energyHolder.progressOffsetX(),
relY + energyHolder.progressHeightOffset(energyFraction),
Expand All @@ -62,7 +62,7 @@ protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, i

// work progress
float workFraction = this.menu.dataHolder.getWorkFraction();
var progressHolder = new TextureHolder(134, 17, 192, 0, 16, 52);
var progressHolder = new TextureHolder(134, 18, 192, 0, 16, 52);
blit(matrixStack,
relX + progressHolder.progressOffsetX(),
relY + progressHolder.progressHeightOffset(workFraction),
Expand All @@ -77,25 +77,25 @@ protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, i
protected void renderTooltip(PoseStack stack, int x, int y) {
super.renderTooltip(stack, x, y);

if (this.isHovering(116, 35, 16, 16, x, y)) {
if (this.isHovering(116, 36, 16, 16, x, y)) {
this.renderComponentTooltip(stack, List.of(this.menu.getWorkStatus().getTranslation()), x, y, this.font);
}

if (this.isHovering(152, 17, 16, 52, x, y)) {
if (this.isHovering(152, 18, 16, 52, x, y)) {
this.renderComponentTooltip(stack, List.of(
translateTooltip("fluxBar"),
translateTooltip("fluxData", this.menu.dataHolder.getEnergy(), this.menu.dataHolder.getMaxEnergy())
), x, y, this.font);
}

if (this.isHovering(134, 17, 16, 52, x, y)) {
if (this.isHovering(134, 18, 16, 52, x, y)) {
this.renderComponentTooltip(stack, List.of(
translateTooltip("workBar"),
translateTooltip("workData", this.menu.dataHolder.getWork(), this.menu.dataHolder.getMaxWork())
), x, y, this.font);
}

if (this.isHovering(116, 53, 16, 16, x, y) && shouldShowSlotTooltip()) {
if (this.isHovering(116, 54, 16, 16, x, y) && shouldShowSlotTooltip()) {
this.renderComponentTooltip(stack, List.of(translateTooltip("upgradeSlot")), x, y, this.font);
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/exmachinis/textures/gui/flux_sieve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ae67838

Please sign in to comment.