From 0164c63e40a1ae9f5ee34c29994f14741d66b6b0 Mon Sep 17 00:00:00 2001 From: Xander Date: Sat, 1 Aug 2026 17:20:06 +0100 Subject: [PATCH 1/2] Separate GUI scale for button guides --- .../controlify/api/guide/GuideInstance.java | 13 +++++- .../config/dto/dfu/ControlifyDataFixer.java | 11 ++++- .../config/dto/dfu/ControlifySchemas.java | 6 +++ .../dto/dfu/fixes/GuideGuiScaleFix.java | 41 +++++++++++++++++ .../dto/profile/GenericControllerConfig.java | 8 +++- .../profile/GenericControllerSettings.java | 16 +++++-- .../gui/guide/GuideInstanceImpl.java | 16 +++++-- .../controlify/gui/guide/GuideRenderer.java | 46 +++++++++++++++---- .../gui/guide/InGameButtonGuide.java | 2 +- .../screen/ControllerConfigScreenFactory.java | 30 ++++++++++++ .../AbstractContainerScreenProcessor.java | 9 +++- .../controllers/default_config.json | 4 +- .../assets/controlify/lang/en_us.json | 9 ++-- 13 files changed, 184 insertions(+), 27 deletions(-) create mode 100644 src/main/java/dev/isxander/controlify/config/dto/dfu/fixes/GuideGuiScaleFix.java diff --git a/src/main/java/dev/isxander/controlify/api/guide/GuideInstance.java b/src/main/java/dev/isxander/controlify/api/guide/GuideInstance.java index aef2872a5..fd34fb61c 100644 --- a/src/main/java/dev/isxander/controlify/api/guide/GuideInstance.java +++ b/src/main/java/dev/isxander/controlify/api/guide/GuideInstance.java @@ -15,6 +15,15 @@ public interface GuideInstance { boolean update(T context, Font font); - void extractRenderState(GuiGraphicsExtractor graphics, boolean bottomAligned, boolean textContrast); - Renderable renderable(boolean bottomAligned, boolean textContrast); + void extractRenderState(GuiGraphicsExtractor graphics, boolean bottomAligned, boolean textContrast, int guiScale); + + default void extractRenderState(GuiGraphicsExtractor graphics, boolean bottomAligned, boolean textContrast) { + extractRenderState(graphics, bottomAligned, textContrast, -1); + } + + Renderable renderable(boolean bottomAligned, boolean textContrast, int guiScale); + + default Renderable renderable(boolean bottomAligned, boolean textContrast) { + return renderable(bottomAligned, textContrast, -1); + } } diff --git a/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifyDataFixer.java b/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifyDataFixer.java index 350bfedc6..385eb7171 100644 --- a/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifyDataFixer.java +++ b/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifyDataFixer.java @@ -13,7 +13,7 @@ import dev.isxander.controlify.config.settings.profile.ProfileSettings; public final class ControlifyDataFixer { - public static final int CURRENT_VERSION = 6; + public static final int CURRENT_VERSION = 7; private static final DataFixer FIXER = createFixer(); @@ -29,15 +29,24 @@ private static DataFixer createFixer() { var v2 = builder.addSchema(2, ControlifySchemas.V2::new); var v3 = builder.addSchema(3, ControlifySchemas.V3::new); var v6 = builder.addSchema(6, ControlifySchemas.V6::new); + var v7 = builder.addSchema(7, ControlifySchemas.V7::new); var globalDefaults = GlobalSettings.defaults(); var profileDefaults = ProfileSettings.createDefault(); + // v1 builder.addFixer(new TheHolyMigrationFix(v1, globalDefaults, profileDefaults)); + + // v2 builder.addFixer(new AnalogueMovementWhitelistFix(v2)); builder.addFixer(new HorizontalLookInvertFix(v2)); + + // v6 builder.addFixer(new DualsenseConfigFix(v6, profileDefaults)); + // v7 + builder.addFixer(new GuideGuiScaleFix(v7, profileDefaults)); + return builder.build().fixer(); } diff --git a/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifySchemas.java b/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifySchemas.java index adb3f1834..0a7043569 100644 --- a/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifySchemas.java +++ b/src/main/java/dev/isxander/controlify/config/dto/dfu/ControlifySchemas.java @@ -80,4 +80,10 @@ public V6(int versionKey, Schema parent) { super(versionKey, parent); } } + + public static class V7 extends Schema { + public V7(int versionKey, Schema parent) { + super(versionKey, parent); + } + } } diff --git a/src/main/java/dev/isxander/controlify/config/dto/dfu/fixes/GuideGuiScaleFix.java b/src/main/java/dev/isxander/controlify/config/dto/dfu/fixes/GuideGuiScaleFix.java new file mode 100644 index 000000000..dd207a3fc --- /dev/null +++ b/src/main/java/dev/isxander/controlify/config/dto/dfu/fixes/GuideGuiScaleFix.java @@ -0,0 +1,41 @@ +package dev.isxander.controlify.config.dto.dfu.fixes; + +import com.mojang.datafixers.DSL; +import com.mojang.datafixers.DataFix; +import com.mojang.datafixers.TypeRewriteRule; +import com.mojang.datafixers.schemas.Schema; +import com.mojang.serialization.Dynamic; +import dev.isxander.controlify.config.dto.dfu.ControlifyTypeReferences; +import dev.isxander.controlify.config.settings.profile.ProfileSettings; + +public class GuideGuiScaleFix extends DataFix { + private final ProfileSettings profileDefaults; + + public GuideGuiScaleFix(Schema outputSchema, ProfileSettings profileDefaults) { + super(outputSchema, true); + this.profileDefaults = profileDefaults; + } + + @Override + protected TypeRewriteRule makeRule() { + var profileType = getInputSchema().getType(ControlifyTypeReferences.PROFILE_CONFIG); + + return fixTypeEverywhereTyped( + "Controlify: add guide gui scale defaults", + profileType, + typed -> typed.update(DSL.remainderFinder(), this::rewriteProfile) + ); + } + + private Dynamic rewriteProfile(Dynamic root) { + Dynamic generic = root.get("generic").orElseEmptyMap(); + Dynamic guide = generic.get("guide").orElseEmptyMap(); + + guide = guide + .set("ingame_gui_scale", root.createInt(profileDefaults.generic.guide.ingameGuiScale)) + .set("screen_gui_scale", root.createInt(profileDefaults.generic.guide.screenGuiScale)); + + generic = generic.set("guide", guide); + return root.set("generic", generic); + } +} diff --git a/src/main/java/dev/isxander/controlify/config/dto/profile/GenericControllerConfig.java b/src/main/java/dev/isxander/controlify/config/dto/profile/GenericControllerConfig.java index 843ee84e2..3135f2ebb 100644 --- a/src/main/java/dev/isxander/controlify/config/dto/profile/GenericControllerConfig.java +++ b/src/main/java/dev/isxander/controlify/config/dto/profile/GenericControllerConfig.java @@ -31,13 +31,17 @@ public record GuideConfig( GuideVerbosity verbosity, boolean showIngameGuide, boolean ingameGuideButtom, - boolean showScreenGuides + boolean showScreenGuides, + int ingameGuiScale, + int screenGuiScale ) { public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( GuideVerbosity.CODEC.fieldOf("verbosity").forGetter(GuideConfig::verbosity), Codec.BOOL.fieldOf("show_ingame_guide").forGetter(GuideConfig::showIngameGuide), Codec.BOOL.fieldOf("ingame_guide_bottom").forGetter(GuideConfig::ingameGuideButtom), - Codec.BOOL.fieldOf("show_screen_guides").forGetter(GuideConfig::showScreenGuides) + Codec.BOOL.fieldOf("show_screen_guides").forGetter(GuideConfig::showScreenGuides), + Codec.intRange(-1, Integer.MAX_VALUE).fieldOf("ingame_gui_scale").forGetter(GuideConfig::ingameGuiScale), + Codec.intRange(-1, Integer.MAX_VALUE).fieldOf("screen_gui_scale").forGetter(GuideConfig::screenGuiScale) ).apply(instance, GuideConfig::new)); } diff --git a/src/main/java/dev/isxander/controlify/config/settings/profile/GenericControllerSettings.java b/src/main/java/dev/isxander/controlify/config/settings/profile/GenericControllerSettings.java index a0b16dae1..6613f8b21 100644 --- a/src/main/java/dev/isxander/controlify/config/settings/profile/GenericControllerSettings.java +++ b/src/main/java/dev/isxander/controlify/config/settings/profile/GenericControllerSettings.java @@ -60,17 +60,23 @@ public static class GuideSettings { public boolean showIngameGuide; public boolean ingameGuideBottom; public boolean showScreenGuides; + public int ingameGuiScale; + public int screenGuiScale; public GuideSettings( GuideVerbosity verbosity, boolean showIngameGuide, boolean ingameGuideBottom, - boolean showScreenGuides + boolean showScreenGuides, + int ingameGuiScale, + int screenGuiScale ) { this.verbosity = verbosity; this.showIngameGuide = showIngameGuide; this.ingameGuideBottom = ingameGuideBottom; this.showScreenGuides = showScreenGuides; + this.ingameGuiScale = ingameGuiScale; + this.screenGuiScale = screenGuiScale; } public static GuideSettings fromDTO(GenericControllerConfig.GuideConfig dto) { @@ -78,7 +84,9 @@ public static GuideSettings fromDTO(GenericControllerConfig.GuideConfig dto) { dto.verbosity(), dto.showIngameGuide(), dto.ingameGuideButtom(), - dto.showScreenGuides() + dto.showScreenGuides(), + dto.ingameGuiScale(), + dto.screenGuiScale() ); } @@ -87,7 +95,9 @@ public GenericControllerConfig.GuideConfig toDTO() { verbosity, showIngameGuide, ingameGuideBottom, - showScreenGuides + showScreenGuides, + ingameGuiScale, + screenGuiScale ); } } diff --git a/src/main/java/dev/isxander/controlify/gui/guide/GuideInstanceImpl.java b/src/main/java/dev/isxander/controlify/gui/guide/GuideInstanceImpl.java index c450aa3af..9967870f5 100644 --- a/src/main/java/dev/isxander/controlify/gui/guide/GuideInstanceImpl.java +++ b/src/main/java/dev/isxander/controlify/gui/guide/GuideInstanceImpl.java @@ -61,17 +61,25 @@ public boolean update(T context, Font font) { } @Override - public void extractRenderState(GuiGraphicsExtractor graphics, boolean bottomAligned, boolean textContrast) { - GuideRenderer.extractRenderState(graphics, this, Minecraft.getInstance(), bottomAligned, textContrast); + public void extractRenderState(GuiGraphicsExtractor graphics, boolean bottomAligned, boolean textContrast, int guiScale) { + GuideRenderer.extractRenderState( + graphics, + this, + Minecraft.getInstance(), + bottomAligned, + textContrast, + guiScale + ); } @Override - public Renderable renderable(boolean bottomAligned, boolean textContrast) { + public Renderable renderable(boolean bottomAligned, boolean textContrast, int guiScale) { return new GuideRenderer.Renderable( this, Minecraft.getInstance(), bottomAligned, - textContrast + textContrast, + guiScale ); } diff --git a/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java b/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java index e06b69eb7..1a73aec11 100644 --- a/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java +++ b/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java @@ -7,6 +7,7 @@ package dev.isxander.controlify.gui.guide; import com.google.common.collect.Lists; +import com.mojang.blaze3d.platform.Window; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphicsExtractor; @@ -15,12 +16,35 @@ public final class GuideRenderer { private GuideRenderer() {} - public static void extractRenderState(GuiGraphicsExtractor graphics, GuideInstanceImpl guideInstance, Minecraft minecraft, boolean bottomAligned, boolean textContrast) { - int width = minecraft.getWindow().getGuiScaledWidth(); - int height = minecraft.getWindow().getGuiScaledHeight(); + public static void extractRenderState(GuiGraphicsExtractor graphics, GuideInstanceImpl guideInstance, Minecraft minecraft, boolean bottomAligned, boolean textContrast, int guiScale) { + Window window = minecraft.getWindow(); + int standardGuiScale = window.getGuiScale(); + if (guiScale == -1) { // unset + guiScale = standardGuiScale; + } else if (guiScale == 0) { // automatic + int maxGuiScale = window.calculateScale(0, minecraft.isEnforceUnicode()); + // pick 1 less than the largest, but make sure it's not bigger than the standard scale + guiScale = Math.min(maxGuiScale - 1, standardGuiScale); + } else { + guiScale = window.calculateScale(guiScale, minecraft.isEnforceUnicode()); + } + + graphics.pose().pushMatrix(); + int scaledWidth; + int scaledHeight; + if (guiScale < standardGuiScale && guiScale > 0) { + graphics.pose().scale((float) guiScale / standardGuiScale, (float) guiScale / standardGuiScale); + scaledWidth = window.getWidth() / guiScale; + scaledHeight = window.getHeight() / guiScale; + } else { + scaledWidth = graphics.guiWidth(); + scaledHeight = graphics.guiHeight(); + } - extractLines(graphics, guideInstance.leftGuides(), minecraft.font, width, height, bottomAligned, false, textContrast); - extractLines(graphics, guideInstance.rightGuides(), minecraft.font, width, height, bottomAligned, true, textContrast); + extractLines(graphics, guideInstance.leftGuides(), minecraft.font, scaledWidth, scaledHeight, bottomAligned, false, textContrast); + extractLines(graphics, guideInstance.rightGuides(), minecraft.font, scaledWidth, scaledHeight, bottomAligned, true, textContrast); + + graphics.pose().popMatrix(); } private static void extractLines(GuiGraphicsExtractor graphics, PrecomputedLines lines, Font font, int width, int height, boolean bottomAligned, boolean rightAligned, boolean textContrast) { @@ -51,23 +75,25 @@ private static void extractLines(GuiGraphicsExtractor graphics, PrecomputedLines } } - static class Renderable implements net.minecraft.client.gui.components.Renderable { + public static class Renderable implements net.minecraft.client.gui.components.Renderable { private final GuideInstanceImpl instance; private final Minecraft minecraft; private boolean bottomAligned; private boolean textContrast; + private int guiScale; - public Renderable(GuideInstanceImpl instance, Minecraft minecraft, boolean bottomAligned, boolean textContrast) { + public Renderable(GuideInstanceImpl instance, Minecraft minecraft, boolean bottomAligned, boolean textContrast, int guiScale) { this.instance = instance; this.minecraft = minecraft; this.bottomAligned = bottomAligned; this.textContrast = textContrast; + this.guiScale = guiScale; } @Override public void extractRenderState(@NonNull GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a) { - GuideRenderer.extractRenderState(graphics, instance, minecraft, bottomAligned, textContrast); + GuideRenderer.extractRenderState(graphics, instance, minecraft, bottomAligned, textContrast, guiScale); } public void setBottomAligned(boolean bottomAligned) { @@ -77,5 +103,9 @@ public void setBottomAligned(boolean bottomAligned) { public void setTextContrast(boolean textContrast) { this.textContrast = textContrast; } + + public void setGuiScale(int guiScale) { + this.guiScale = guiScale; + } } } diff --git a/src/main/java/dev/isxander/controlify/gui/guide/InGameButtonGuide.java b/src/main/java/dev/isxander/controlify/gui/guide/InGameButtonGuide.java index 359b4afe7..55b783105 100644 --- a/src/main/java/dev/isxander/controlify/gui/guide/InGameButtonGuide.java +++ b/src/main/java/dev/isxander/controlify/gui/guide/InGameButtonGuide.java @@ -37,7 +37,7 @@ public void extractRenderState(GuiGraphicsExtractor graphics, float tickDelta) { GenericControllerSettings.GuideSettings settings = controller.settings().generic.guide; if (!debugOpen && !hideGui && !screenOpen && settings.showIngameGuide) { - this.guideInstance.extractRenderState(graphics, settings.ingameGuideBottom, true); + this.guideInstance.extractRenderState(graphics, settings.ingameGuideBottom, true, settings.ingameGuiScale); } } diff --git a/src/main/java/dev/isxander/controlify/gui/screen/ControllerConfigScreenFactory.java b/src/main/java/dev/isxander/controlify/gui/screen/ControllerConfigScreenFactory.java index b79b00f63..cc16c9bae 100644 --- a/src/main/java/dev/isxander/controlify/gui/screen/ControllerConfigScreenFactory.java +++ b/src/main/java/dev/isxander/controlify/gui/screen/ControllerConfigScreenFactory.java @@ -371,6 +371,36 @@ private Optional makeAccessibilityGroup( .binding(gDefaults.guide.showScreenGuides, () -> gSettings.guide.showScreenGuides, v -> gSettings.guide.showScreenGuides = v) .controller(TickBoxControllerBuilder::create) .build()) + .option(Option.createBuilder() + .name(Component.translatable("controlify.gui.ingame_guide_gui_scale")) + .description(OptionDescription.createBuilder() + .text(Component.translatable("controlify.gui.ingame_guide_gui_scale.tooltip")) + .build()) + .binding(gDefaults.guide.ingameGuiScale, () -> gSettings.guide.ingameGuiScale, v -> gSettings.guide.ingameGuiScale = v) + .controller(opt -> IntegerSliderControllerBuilder.create(opt) + .range(-1, Minecraft.getInstance().getWindow().calculateScale(0, Minecraft.getInstance().isEnforceUnicode())) + .step(1) + .formatValue(v -> switch (v) { + case -1 -> Component.translatable("controlify.gui.guide_gui_scale.unchanged"); + case 0 -> Component.translatable("controlify.gui.guide_gui_scale.auto"); + default -> Component.literal(String.valueOf(v)); + })) + .build()) + .option(Option.createBuilder() + .name(Component.translatable("controlify.gui.screen_guide_gui_scale")) + .description(OptionDescription.createBuilder() + .text(Component.translatable("controlify.gui.screen_guide_gui_scale.tooltip")) + .build()) + .binding(gDefaults.guide.screenGuiScale, () -> gSettings.guide.screenGuiScale, v -> gSettings.guide.screenGuiScale = v) + .controller(opt -> IntegerSliderControllerBuilder.create(opt) + .range(-1, Minecraft.getInstance().getWindow().calculateScale(0, Minecraft.getInstance().isEnforceUnicode())) + .step(1) + .formatValue(v -> switch (v) { + case -1 -> Component.translatable("controlify.gui.guide_gui_scale.unchanged"); + case 0 -> Component.translatable("controlify.gui.guide_gui_scale.auto"); + default -> Component.literal(String.valueOf(v)); + })) + .build()) .option(Option.createBuilder() .name(Component.translatable("controlify.gui.show_keyboard")) .description(OptionDescription.createBuilder() diff --git a/src/main/java/dev/isxander/controlify/screenop/compat/vanilla/AbstractContainerScreenProcessor.java b/src/main/java/dev/isxander/controlify/screenop/compat/vanilla/AbstractContainerScreenProcessor.java index 148640917..1a6885efb 100644 --- a/src/main/java/dev/isxander/controlify/screenop/compat/vanilla/AbstractContainerScreenProcessor.java +++ b/src/main/java/dev/isxander/controlify/screenop/compat/vanilla/AbstractContainerScreenProcessor.java @@ -14,6 +14,7 @@ import dev.isxander.controlify.controller.ControllerEntity; import dev.isxander.controlify.controller.haptic.HapticEffects; import dev.isxander.controlify.gui.guide.GuideDomains; +import dev.isxander.controlify.gui.guide.GuideRenderer; import dev.isxander.controlify.mixins.feature.guide.screen.AbstractContainerScreenAccessor; import dev.isxander.controlify.mixins.feature.screenop.ScreenAccessor; import dev.isxander.controlify.screenop.ScreenProcessor; @@ -32,7 +33,7 @@ public class AbstractContainerScreenProcessor> extends ScreenProcessor { private final GuideInstance guideInstance; - private final Renderable guideRenderable; + private GuideRenderer.Renderable guideRenderable; private final Supplier hoveredSlot; private final ClickSlotFunction clickSlotFunction; @@ -50,7 +51,6 @@ public AbstractContainerScreenProcessor( this.clickSlotFunction = clickSlotFunction; this.doItemSlotActions = doItemSlotActions; this.guideInstance = GuideDomains.CONTAINER.createInstance(); - this.guideRenderable = guideInstance.renderable(true, false); } @Override @@ -112,6 +112,8 @@ protected void handleScreenVMouse(ControllerEntity controller, VirtualMouseHandl @Override public void onWidgetRebuild() { + this.guideRenderable = (GuideRenderer.Renderable) guideInstance.renderable(true, false); + if (ControlifyApi.get().currentInputMode().isController()) { setRenderGuide(true); } @@ -123,6 +125,9 @@ public void onInputModeChanged(InputMode mode) { } private void setRenderGuide(boolean render) { + ControlifyApi.get().getCurrentController() + .ifPresent(c -> this.guideRenderable.setGuiScale(c.settings().generic.guide.screenGuiScale)); + render &= ControlifyApi.get().getCurrentController().map(c -> c.settings().generic.guide.showScreenGuides).orElse(false); List renderables = ((ScreenAccessor) screen).controlify$getRenderables(); diff --git a/src/main/resources/assets/controlify/controllers/default_config.json b/src/main/resources/assets/controlify/controllers/default_config.json index 033431232..e085ad660 100644 --- a/src/main/resources/assets/controlify/controllers/default_config.json +++ b/src/main/resources/assets/controlify/controllers/default_config.json @@ -8,7 +8,9 @@ "verbosity": "full", "show_ingame_guide": true, "ingame_guide_bottom": false, - "show_screen_guides": true + "show_screen_guides": true, + "ingame_gui_scale": 0, + "screen_gui_scale": 0 }, "keyboard": { "show_on_screen_keyboard": true, diff --git a/src/main/resources/assets/controlify/lang/en_us.json b/src/main/resources/assets/controlify/lang/en_us.json index 4c4d30763..1960a11a8 100644 --- a/src/main/resources/assets/controlify/lang/en_us.json +++ b/src/main/resources/assets/controlify/lang/en_us.json @@ -70,9 +70,6 @@ "controlify.gui.add_server_to_analogue_move_whitelist.tooltip": "Adds the current server to the analogue movement whitelist.", "controlify.gui.analogue_movement_whitelist": "Analogue Movement Whitelist", "controlify.gui.analogue_movement_whitelist.tooltip": "Servers listed here will use full analogue movement instead of keyboard-like movement. Only whitelist servers that permit analogue movement, as some server anti-cheats may reject it. A server policy requiring keyboard-like movement takes priority.", - "controlify.gui.ingame_button_guide_scale": "Ingame Button Guide Scale", - "controlify.gui.ingame_button_guide_scale.tooltip": "How big the ingame button guide is. This is a percentage of the currently selected GUI scale. 100% will match the usual scale.", - "controlify.gui.ingame_button_guide_scale.tooltip.warning": "This may cause scaling issues that will make it to look bad at anything but 100%.", "controlify.gui.open_issue_tracker": "Open Issue Tracker", "controlify.gui.use_enhanced_steam_deck_driver": "Use Enhanced Steam Deck Driver", "controlify.gui.use_enhanced_steam_deck_driver.tooltip": "If enabled, Controlify will use an enhanced driver for the Steam Deck to improve compatibility and performance. This is experimental and may have bugs. This driver requires Decky Loader to be installed on your Deck.", @@ -122,6 +119,12 @@ "controlify.gui.guide_verbosity.tooltip": "How much information is shown in button guides.", "controlify.gui.show_screen_guide": "Show Screen Button Guide", "controlify.gui.show_screen_guide.tooltip": "Show various helpers in GUIs to assist in using controller input.", + "controlify.gui.ingame_guide_gui_scale": "Ingame Button Guide GUI Scale", + "controlify.gui.ingame_guide_gui_scale.tooltip": "Change the GUI scale of the Ingame Button Guide separately from the rest of the game's GUI.", + "controlify.gui.screen_guide_gui_scale": "Screen Button Guide GUI Scale", + "controlify.gui.screen_guide_gui_scale.tooltip": "Change the GUI scale of the Screen Button Guide separately from the rest of the game's GUI.", + "controlify.gui.guide_gui_scale.unchanged": "Unchanged", + "controlify.gui.guide_gui_scale.auto": "Automatic", "controlify.gui.show_keyboard": "Show On-Screen Keyboard", "controlify.gui.show_keyboard.tooltip": "Shows an on-screen keyboard when required. A pop-up keyboard will appear when you focus on a text box, and a static keyboard will appear in the chat screen.", "controlify.gui.chat_screen_offset": "On-screen keyboard height", From fe676e0576eb309fa88d48900dd001a9c719a931 Mon Sep 17 00:00:00 2001 From: Xander Date: Sat, 1 Aug 2026 17:29:39 +0100 Subject: [PATCH 2/2] Apply configured scales above the standard scale --- .../java/dev/isxander/controlify/gui/guide/GuideRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java b/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java index 1a73aec11..d0864217d 100644 --- a/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java +++ b/src/main/java/dev/isxander/controlify/gui/guide/GuideRenderer.java @@ -32,7 +32,7 @@ public static void extractRenderState(GuiGraphicsExtractor graphics, GuideInstan graphics.pose().pushMatrix(); int scaledWidth; int scaledHeight; - if (guiScale < standardGuiScale && guiScale > 0) { + if (guiScale > 0 && guiScale != standardGuiScale) { graphics.pose().scale((float) guiScale / standardGuiScale, (float) guiScale / standardGuiScale); scaledWidth = window.getWidth() / guiScale; scaledHeight = window.getHeight() / guiScale;