Page 1 of 1

[RETRACTED] Absolute maximum GUI size

Posted: Sun Jan 24, 2021 2:09 am
by modo_lv
Currently, increasing UI scaling increases all GUI sizes, including maximum width & height. In case of trying to prevent a window from overlapping other UI elements, this achieves the opposite effect — max. size 600 @ 100% becomes max. size 1200 on 200%, ensuring that it will overlap other elements, given large enough contents.

I understand that maximum sizes need to scale with UI in order to keep related elements scaling properly, but maybe there could be an additional parameter for non-scaled maximums? "absolute_maximal_height" or something?

Re: Absolute maximum GUI size

Posted: Sun Jan 24, 2021 5:53 pm
by Rseding91
I don't think you quite understand how GUI is supposed to work; you never care about scale. Everything functions in terms of 100% scale and you simply multiply your values by the current scale. Past that; what the actual size ends up as isn't meant to matter. The scale is exposed to Lua.

Re: Absolute maximum GUI size

Posted: Sun Jan 24, 2021 5:57 pm
by modo_lv
Yes, Loewchen explained to me in another thread that upscaling isn't supposed to work properly on regular (1080p) displays, it's only for 2K, 4K and other large sizes. So what I was trying to do is just as unsupported; it was based on a misunderstanding about the design goals of UI scaling.

Re: [RETRACTED] Absolute maximum GUI size

Posted: Sun Jan 24, 2021 8:07 pm
by Rseding91
You *could* try to dynamically scale your GUI based off the resolution and scale but the base game largely doesn't. So if it's something you want to do; you should have all the information you need: resolution and scale.