diff --git a/src/main/java/com/github/telvarost/finalbeta/Config.java b/src/main/java/com/github/telvarost/finalbeta/Config.java index 3a51088..c52b7cf 100644 --- a/src/main/java/com/github/telvarost/finalbeta/Config.java +++ b/src/main/java/com/github/telvarost/finalbeta/Config.java @@ -54,9 +54,10 @@ public static class ConfigFields { @ConfigName("Fix minecart stopping on items") public static Boolean FIX_MINECART_STOPPING_ON_ITEMS = true; - @ConfigName("Improved option/video menu controls") - @Comment("Adds controls for clouds, fog, and FOV") - public static Boolean IMPROVED_MENU_CONTROLS = true; + /** - At the current moment this is not toggle-able */ +// @ConfigName("Improved option/video menu controls") +// @Comment("Adds controls for clouds, fog, and FOV") +// public static Boolean IMPROVED_MENU_CONTROLS = true; @ConfigName("Use \"Shift + DROP_KEY\" to drop item stack") public static Boolean STACK_DROP = false; diff --git a/src/main/java/com/github/telvarost/finalbeta/mixin/options/OptionsScreenMixin.java b/src/main/java/com/github/telvarost/finalbeta/mixin/options/OptionsScreenMixin.java index 49e668b..e4b38c9 100644 --- a/src/main/java/com/github/telvarost/finalbeta/mixin/options/OptionsScreenMixin.java +++ b/src/main/java/com/github/telvarost/finalbeta/mixin/options/OptionsScreenMixin.java @@ -32,14 +32,4 @@ public abstract class OptionsScreenMixin extends ScreenBase { OPTIONS = Arrays.copyOf(OPTIONS, OPTIONS.length + 1); OptionsScreenMixin.OPTIONS[OptionsScreenMixin.OPTIONS.length - 1] = ModOptions.fovOption; } - - @Inject(method = "buttonClicked", at = @At("HEAD"), cancellable = true) - public void finalBeta_openImprovedControls(Button button, CallbackInfo ci) { - if (Config.ConfigFields.IMPROVED_MENU_CONTROLS) { - if (button.id == 100) { - this.minecraft.openScreen(new Controls(this, this.gameOptions)); - ci.cancel(); - } - } - } } diff --git a/src/main/java/com/github/telvarost/finalbeta/mixin/options/VideoSettingsMixin.java b/src/main/java/com/github/telvarost/finalbeta/mixin/options/VideoSettingsMixin.java index 9225cea..ca06bbb 100644 --- a/src/main/java/com/github/telvarost/finalbeta/mixin/options/VideoSettingsMixin.java +++ b/src/main/java/com/github/telvarost/finalbeta/mixin/options/VideoSettingsMixin.java @@ -5,8 +5,10 @@ import net.minecraft.client.gui.screen.menu.VideoSettings; import net.minecraft.client.gui.widgets.Button; import net.minecraft.client.gui.widgets.OptionButton; +import net.minecraft.client.gui.widgets.Slider; import net.minecraft.client.options.GameOptions; import net.minecraft.client.options.Option; +import net.minecraft.client.util.ScreenScaler; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -46,6 +48,13 @@ protected void buttonClicked(Button arg, CallbackInfo ci) { this.minecraft.options.saveOptions(); this.minecraft.openScreen(this.parent); } + + if (!(arg instanceof Slider)) { + ScreenScaler var2 = new ScreenScaler(this.minecraft.options, this.minecraft.actualWidth, this.minecraft.actualHeight); + int var3 = var2.getScaledWidth(); + int var4 = var2.getScaledHeight(); + this.init(this.minecraft, var3, var4); + } } ci.cancel(); }