diff --git a/src/main/java/com/cleanroommc/modularui/screen/ClientScreenHandler.java b/src/main/java/com/cleanroommc/modularui/screen/ClientScreenHandler.java index 1a0a26d5b..e492038c2 100644 --- a/src/main/java/com/cleanroommc/modularui/screen/ClientScreenHandler.java +++ b/src/main/java/com/cleanroommc/modularui/screen/ClientScreenHandler.java @@ -414,7 +414,7 @@ public static boolean shouldDrawWorldBackground() { } public static void drawDarkBackground(GuiScreen screen, int tint) { - if (hasScreen()) { + if (hasScreen() && currentScreen.shouldDrawDarkBackground()) { float alpha = ModularUI.Mods.NEA.isLoaded() ? OpeningAnimation.getValue(screen) : 1f; // vanilla color values as hex int color = 0x101010; diff --git a/src/main/java/com/cleanroommc/modularui/screen/ModularScreen.java b/src/main/java/com/cleanroommc/modularui/screen/ModularScreen.java index f66f75873..b8dc16b38 100644 --- a/src/main/java/com/cleanroommc/modularui/screen/ModularScreen.java +++ b/src/main/java/com/cleanroommc/modularui/screen/ModularScreen.java @@ -86,6 +86,7 @@ public static ModularScreen getCurrent() { private final ScreenResizeNode resizeNode = new ScreenResizeNode(this); private boolean pausesGame = false; private boolean openParentOnClose = false; + private boolean drawDarkBackground = true; private String themeOverride; private ITheme currentTheme; @@ -660,6 +661,10 @@ public boolean doesPauseGame() { return pausesGame; } + public boolean shouldDrawDarkBackground() { + return drawDarkBackground; + } + public boolean isOpenParentOnClose() { return openParentOnClose; } @@ -782,6 +787,11 @@ public ModularScreen pausesGame(boolean pausesGame) { return this; } + public ModularScreen drawDarkBackground(boolean drawDarkBackground) { + this.drawDarkBackground = drawDarkBackground; + return this; + } + public ModularScreen openParentOnClose(boolean openParentOnClose) { this.openParentOnClose = openParentOnClose; return this;