diff --git a/src/main/java/com/simibubi/create/foundation/config/CClient.java b/src/main/java/com/simibubi/create/foundation/config/CClient.java index fbd8c1d7a..bdaf48de0 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CClient.java +++ b/src/main/java/com/simibubi/create/foundation/config/CClient.java @@ -3,7 +3,7 @@ package com.simibubi.create.foundation.config; public class CClient extends ConfigBase { public ConfigGroup client = group(0, "client", - "Client-only settings - If you're looking for general settings, look inside your worlds serverconfig folder!"); + "Client-only settings - If you're looking for general settings, look inside your worlds serverconfig folder!"); public ConfigBool tooltips = b(true, "enableTooltips", "Show item descriptions on Shift and controls on Ctrl."); public ConfigBool enableOverstressedTooltip = b(true, "enableOverstressedTooltip", "Display a tooltip when looking at overstressed components."); @@ -12,13 +12,18 @@ public class CClient extends ConfigBase { public ConfigFloat fanParticleDensity = f(.5f, 0, 1, "fanParticleDensity"); public ConfigBool rainbowDebug = b(true, "enableRainbowDebug", "Show colourful debug information while the F3-Menu is open."); - public ConfigBool experimentalRendering = b(true, "experimentalRendering", "Use modern OpenGL features to drastically increase performance."); + public ConfigInt overlayOffsetX = i(20, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetX", + "Offset the overlay from goggle- and hover- information by this many pixels on the X axis; Use /create overlay"); + public ConfigInt overlayOffsetY = i(0, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetY", + "Offset the overlay from goggle- and hover- information by this many pixels on the Y axis; Use /create overlay"); + public ConfigBool smoothPlacementIndicator = b(false, "smoothPlacementIndicator", + "Use an alternative indicator when showing where the assisted placement ends up relative to your crosshair"); - public ConfigInt overlayOffsetX = i(20, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetX", "Offset the overlay from goggle- and hover- information by this many pixels on the X axis; Use /create overlay"); - public ConfigInt overlayOffsetY = i(0, Integer.MIN_VALUE, Integer.MAX_VALUE, "overlayOffsetY", "Offset the overlay from goggle- and hover- information by this many pixels on the Y axis; Use /create overlay"); - public ConfigBool smoothPlacementIndicator = b(false, "smoothPlacementIndicator", "Use an alternative indicator when showing where the assisted placement ends up relative to your crosshair"); + public ConfigGroup ponder = group(1, "ponder", "Ponder settings"); + public ConfigBool comfyReading = + b(false, "comfyReading", "Slow down a ponder scene whenever there is text on screen."); @Override public String getName() { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java index 126d10ad0..c9e4d1e9a 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java @@ -12,6 +12,7 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.gui.GuiGameElement; @@ -80,7 +81,6 @@ public class PonderUI extends NavigatableSimiScreen { PonderChapter chapter = null; private boolean userViewMode; - private boolean slowTextMode; private boolean identifyMode; private ItemStack hoveredTooltipItem; private BlockPos hoveredBlockPos; @@ -205,7 +205,7 @@ public class PonderUI extends NavigatableSimiScreen { .fade(0, -1)); widgets.add(slowMode = new PonderButton(width - 20 - 31, bY, () -> { - slowTextMode = !slowTextMode; + setComfyReadingEnabled(!isComfyReadingEnabled()); }).showing(AllIcons.I_MTD_SLOW_MODE) .fade(0, -1)); @@ -269,7 +269,7 @@ public class PonderUI extends NavigatableSimiScreen { PonderScene activeScene = scenes.get(index); extendedTickLength = 0; - if (slowTextMode) + if (isComfyReadingEnabled()) activeScene.forEachVisible(TextWindowElement.class, twe -> extendedTickLength = 2); if (extendedTickTimer == 0) { @@ -616,7 +616,7 @@ public class PonderUI extends NavigatableSimiScreen { userMode.dim(); } - if (slowTextMode) + if (isComfyReadingEnabled()) slowMode.flash(); else slowMode.dim(); @@ -981,4 +981,12 @@ public class PonderUI extends NavigatableSimiScreen { hoveredTooltipItem = ItemStack.EMPTY; } + public boolean isComfyReadingEnabled() { + return AllConfigs.CLIENT.comfyReading.get(); + } + + public void setComfyReadingEnabled(boolean slowTextMode) { + AllConfigs.CLIENT.comfyReading.set(slowTextMode); + } + } diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java index 942d0f754..970bd18f1 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java @@ -8,7 +8,7 @@ import net.minecraft.block.Blocks; public class PonderIndex { - public static final boolean EDITOR_MODE = true; + public static final boolean EDITOR_MODE = false; public static void register() { // Register storyboards here diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java b/src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java index 7791bfb25..8e33a1556 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/elements/InputWindowElement.java @@ -84,8 +84,8 @@ public class InputWindowElement extends AnimatedOverlayElement { int width = 0; int height = 0; - int xFade = direction == Pointing.RIGHT ? -1 : direction == Pointing.LEFT ? 1 : 0; - int yFade = direction == Pointing.DOWN ? -1 : direction == Pointing.UP ? 1 : 0; + float xFade = direction == Pointing.RIGHT ? -1 : direction == Pointing.LEFT ? 1 : 0; + float yFade = direction == Pointing.DOWN ? -1 : direction == Pointing.UP ? 1 : 0; xFade *= 10 * (1 - fade); yFade *= 10 * (1 - fade);