Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/cleanroommc/modularui/screen/ModularScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -660,6 +661,10 @@ public boolean doesPauseGame() {
return pausesGame;
}

public boolean shouldDrawDarkBackground() {
return drawDarkBackground;
}

public boolean isOpenParentOnClose() {
return openParentOnClose;
}
Expand Down Expand Up @@ -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;
Expand Down