Added Eyecon as indicator that Ambient Lighting is enabled

Added ShutdownHook to Lighting Handler to prevent high Brightness Values from being saved
This commit is contained in:
CrushedPixel
2015-06-01 13:57:33 +02:00
parent bb773570e9
commit 2918e163d2
4 changed files with 33 additions and 5 deletions

View File

@@ -448,6 +448,22 @@ public class GuiReplayOverlay extends Gui {
}
}
/**
* Render the eye icon in the bottom right corner of the screen.
* @param event Rendered post game overlay
*/
@SubscribeEvent
public void renderLightingIndicator(RenderGameOverlayEvent.Post event) {
if (event.type != RenderGameOverlayEvent.ElementType.ALL) return;
if(ReplayMod.replaySettings.isLightingEnabled() && ReplayHandler.isInReplay()) {
mc.renderEngine.bindTexture(replay_gui);
GlStateManager.resetColor();
GlStateManager.enableAlpha();
Gui.drawModalRectWithCustomSizedTexture(WIDTH - 10 - 19, HEIGHT - 10 - 13,
90, 20, 19, 13, TEXTURE_SIZE, TEXTURE_SIZE);
}
}
/**
* Dummy interface for GUI on which this replay overlay shall not be rendered.
*/