Allow the user to select more gui scales (#399)

This commit is contained in:
Moses Miller authored and GitHub committed 2024-03-25 09:19:35 -07:00
1 parent d15bbb56ee
commit d236689e6a
1 file changed
+2 -2
@@ -92,12 +92,12 @@ public class SodiumGameOptionPages {
firstGroupBuilder.add(Settings.VOID_FOG.option);
groups.add(firstGroupBuilder.build());
int maxGuiScale = Math.max(3, Math.min(Minecraft.getMinecraft().displayWidth / 320, Minecraft.getMinecraft().displayHeight / 240));
groups.add(OptionGroup.createBuilder()
.add(OptionImpl.createBuilder(int.class, vanillaOpts)
.setName(I18n.format("options.guiScale"))
.setTooltip(I18n.format("sodium.options.gui_scale.tooltip"))
.setControl(option -> new SliderControl(option, 0, 3, 1, ControlValueFormatter.guiScale()))
.setControl(option -> new SliderControl(option, 0, maxGuiScale, 1, ControlValueFormatter.guiScale()))
.setBinding((opts, value) -> {
opts.guiScale = value;
// Resizing our window