CCBlueX / LiquidBounce

A free mixin-based injection hacked client for Minecraft using the Fabric API
https://liquidbounce.net/
GNU General Public License v3.0
1.42k stars 460 forks source link

[BUG] Back button in configuration GUI sometimes not visible #998

Open derech1e opened 1 year ago

derech1e commented 1 year ago

LiquidBounce Build/Version

b78 git-9ba674b

Operating System

Windows 11

Minecraft Version

1.8.9

Describe the bug

The back button in the configuration GUI is not visible in a small window resolution. The button or height scaling should take into account the height of the window so that all buttons are visible regardless of the window size.

Steps to reproduce

Client Log

Not required.

Screenshots

https://user-images.githubusercontent.com/39240736/232591619-6733d6eb-9455-4925-aaac-bb1d813d68d7.mp4

CzechHek commented 1 year ago

Perhaps GUIs x, y, ... should get completely redone.

Sizes and positions should be saved in ratios to screen resolution. Text should also be scaled relatively.

With this approach, content would always look identically no matter the window size.

(Isn't this already the default behaviour in mc, how is it done there? Have to look at that...)

derech1e commented 1 year ago

As far as I know, the GUI only scales via the GUI-Scale variable in the mc settings. The rest of the positioning within the resolution also has already been correctly implemented in past of the Alt Manager or in the Contributors GUI. I would have to double check, but I remember in order to always have the button at the bottom edge of the screen, the button height and a margin are subtracted from the total height. Then the postion would be always the same, no matter which resolution.

CzechHek commented 1 year ago

As far as I know, the GUI only scales via the GUI-Scale variable in the mc settings. The rest of the positioning within the resolution also has already been correctly implemented in past of the Alt Manager or in the Contributors GUI. I would have to double check, but I remember in order to always have the button at the bottom edge of the screen, the button height and a margin are subtracted from the total height. Then the postion would be always the same, no matter which resolution.

https://github.com/CCBlueX/LiquidBounce/blob/d7327316d94772d96292c31b696c59bac288c4cb/src/main/java/net/ccbluex/liquidbounce/ui/client/GuiClientConfiguration.kt#L93

This should rather be substracted from total height from what you are saying.

However, what I meant was, that buttons, texts, ... should be scaled so that they are the same size, same position, relative to any window resolution. Right now, there are just set scale values, additions of constant distances such as 25 in GuiClientConfiguration.