TomGrobbe / MenuAPI

FiveM C# Menu API. Designed specifically as a replacement of NativeUI for vMenu. Full safezone scaling supported, both left and right aligned menus supported.
https://docs.vespura.com/mapi
62 stars 45 forks source link

Fix scaling to look accurate for resolutions other than 1920x1080. #1

Closed blattersturm closed 5 years ago

blattersturm commented 5 years ago

Currently, MenuAPI uses absolute screen pixels for all measurements. This looks out of place on resolutions other than 1920x1080, and on HiDPI monitors, will result in menus that look unreadable.

This PR takes into account that all reference measurements were made at 1920x1080, and assumes most measurements will be accurate in height primarily.

This change has been verified to look accurate - not stretch, not be misaligned compared to the GTA HUD, and scale correctly - on a number of resolutions and aspect ratios, from 800x600 to 2560x1440, and from 2560x600 to 800x1440, which are the maximum and minimum resolutions supported by both the testing machine's monitor and GTA.