CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.77k stars 811 forks source link

Fullscreen Resolution Slider #2642

Closed douira closed 1 month ago

douira commented 2 months ago

As a compromise, this adds a fullscreen resolution slider but truncates the label to fit into one line. The design can be refined later, but at least users won't have to go to the vanilla settings for this now. Thanks to @MeeniMc for their previous work in https://github.com/CaffeineMC/sodium-fabric/pull/2296 on adding the option in the first place. I added the two-line functionality and changed the style. related: https://github.com/CaffeineMC/sodium-fabric/issues/46 Closes https://github.com/CaffeineMC/sodium-fabric/issues/2692

MeeniMc commented 2 months ago

It's a good idea but it doesn't work with AUTO gui scale, there is no vertical scrolling and the extra line renders outside the screen now.

douira commented 2 months ago

That's a good point, do you know where one makes the control element notify the GUI system of it's correct size? Is there a place where it calculates the total size of the GUI for determining the scale?

douira commented 2 months ago

I've updated it to be only one line but truncate the width of the label dynamically based on the slider's value width.

MeeniMc commented 2 months ago

LGTM

douira commented 2 months ago

resolved conflicts and brought the branch up to speed with dev

jellysquid3 commented 1 month ago

This is fine as a temporary solution for now. But I wouldn't want to keep around multi-line controls once we rework the video setting screen.

douira commented 1 month ago

This PR doesn't add it as a multiline option (anymore), I replaced it with label truncation.

douira commented 1 month ago

My bad for not updating the description