[Won't change] Weird menu scaling

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Re: Weird menu scaling

Postby phantombeta » Sat Oct 31, 2020 2:47 pm

Accensus wrote:What does all this mean for modders? Do people who make menus still have to use Clean[XY]fac and such? I never actually understood how those variables work and what their purpose in menu code is. I see they're used to scale down items drawn via Screen.Draw* but why it needs to be done is beyond me. Any explanation would be greatly appreciated. Might even be a discussion for a different thread.

Clean[XY]fac never had to be used outside of custom OptionMenu and ListMenu stuff. Those are factors used for a "clean" scaling of the normal menus, where they don't get artifacts from non-integer scaling. There's really no need to use them in completely custom menus made with GenericMenu. (As an example, ZForms never uses that stuff.)
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Weird menu scaling

Postby Accensus » Sat Oct 31, 2020 2:49 pm

Well, shit. Guess I got to refactor some code. Many thanks for the info, phantom.
User avatar
Accensus
Vector, locked in.
 
Joined: 11 Feb 2016
Location: Somalia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Weird menu scaling

Postby Graf Zahl » Sat Oct 31, 2020 3:01 pm

The new version features vastly improved scaling options. Those Clean*fac variables are a relic from a time where computer screens were half the resolution of what they are today, but this got carried over into nearly all UI parts of the engine. With the new features modders will have a lot more control about how their menu will be displayed. The new size variables work similar to SerHudSize in ACS, i.e. you specify a virtual canvas size to render on and the items will be positioned accordingly.
All this has also been exposed as features of the actual drawing functions. Most of this comes from implementing Raze's menu where I wanted to avoid that clean scaling stuff from the start and do it right.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Weird menu scaling

Postby Accensus » Sat Oct 31, 2020 4:31 pm

Impressive! Thank you for this. This is the knowledge I needed to properly refactor this menu code I have.
User avatar
Accensus
Vector, locked in.
 
Joined: 11 Feb 2016
Location: Somalia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Weird menu scaling

Postby drfrag » Sun Nov 01, 2020 4:46 am

The menus were much smaller in recent GZDoom versions. Virtual scaling has a problem and it's that it looks very bad at lower resolutions. Besides some mod menus don't fit but i guess those are very recent mods becouse in LZDoom menus were much bigger with the old clean scaling code, well that code was clearly more "sophisticated". :wink:
Another problem is that long skill menus don't fit and you'll get text menus instead it seems.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Weird menu scaling

Postby Graf Zahl » Sun Nov 01, 2020 7:26 am

The menus were "much smaller" only at specific screen sizes. That's the real problem here. Too many mods never did proper testing of their menus with different sizes and behold the problems this caused.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Previous

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests