diff --git a/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiRecordingOverlay.java b/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiRecordingOverlay.java index fa2e98e5..30722889 100644 --- a/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiRecordingOverlay.java +++ b/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiRecordingOverlay.java @@ -9,6 +9,9 @@ import net.minecraft.client.resources.I18n; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import static eu.crushedpixel.replaymod.gui.overlay.GuiReplayOverlay.TEXTURE_SIZE; +import static eu.crushedpixel.replaymod.gui.overlay.GuiReplayOverlay.replay_gui; + /** * Renders overlay during recording. */ @@ -25,13 +28,14 @@ public class GuiRecordingOverlay { */ @SubscribeEvent public void renderRecordingIndicator(RenderGameOverlayEvent.Post event) { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return; if(ReplayMod.replaySettings.showRecordingIndicator()) { FontRenderer fontRenderer = mc.fontRendererObj; fontRenderer.drawString(I18n.format("replaymod.gui.recording").toUpperCase(), 30, 18 - (fontRenderer.FONT_HEIGHT / 2), 0xffffffff); - mc.renderEngine.bindTexture(GuiReplayOverlay.replay_gui); + mc.renderEngine.bindTexture(replay_gui); GlStateManager.resetColor(); GlStateManager.enableAlpha(); - Gui.drawModalRectWithCustomSizedTexture(10, 10, 40, 21, 16, 16, 64, 64); + Gui.drawModalRectWithCustomSizedTexture(10, 10, 58, 20, 16, 16, TEXTURE_SIZE, TEXTURE_SIZE); } } } diff --git a/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiReplayOverlay.java b/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiReplayOverlay.java index b69029cf..4ae1f306 100755 --- a/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiReplayOverlay.java +++ b/src/main/java/eu/crushedpixel/replaymod/gui/overlay/GuiReplayOverlay.java @@ -310,6 +310,7 @@ public class GuiReplayOverlay extends Gui { @SubscribeEvent public void onRenderGui(RenderGameOverlayEvent.Post event) throws IllegalArgumentException, IllegalAccessException { + if (event.type != RenderGameOverlayEvent.ElementType.ALL) return; if (!isVisible()) return; FMLClientHandler fml = FMLClientHandler.instance();