Skip to content

Commit

Permalink
fix icon alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
RedLime committed Mar 3, 2023
1 parent 4cab27d commit 52d9088
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.redlimerl.speedrunigt.mixins.screen;

import com.mojang.blaze3d.systems.RenderSystem;
import com.redlimerl.speedrunigt.SpeedRunIGTUpdateChecker;
import com.redlimerl.speedrunigt.gui.screen.SpeedRunOptionScreen;
import net.minecraft.client.gui.screen.Screen;
Expand Down Expand Up @@ -36,12 +37,16 @@ private void onInit(CallbackInfo ci) {
this.addButton(timerButton);
}

@SuppressWarnings("deprecation")
@Inject(method = "render", at = @At("TAIL"))
private void renderEnderPearl(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
if (this.client != null) {
RenderSystem.pushMatrix();
RenderSystem.translatef(-.5f, -.5f, 0);
this.client.getTextureManager().bindTexture(timerButton.isHovered() ? ENDER_EYE :
SpeedRunIGTUpdateChecker.UPDATE_STATUS == SpeedRunIGTUpdateChecker.UpdateStatus.OUTDATED ? BLAZE_POWDER : ENDER_PEARL);
drawTexture(matrices, timerButton.x + 2, timerButton.y + 2, 0.0F, 0.0F, 16, 16, 16, 16);
RenderSystem.popMatrix();
}
}
}

0 comments on commit 52d9088

Please sign in to comment.