Resolution Independence
I figured out how to make our GUI resolution-independent so that the existing editor code will correctly create items with the same proportions. This was very difficult, and it works really well! Some images aren't scaled here, but the important thing is the existing code is working the same, with no changes.
When the GUI is scaled to 200%, the buttons are bigger and indented further in from the right / bottom edges. The code that creates them just calls the parent ClientWidth() minus 74 or so, and without changing that code it now scales the button as you would expect. This was very difficult to figure out and I wasn't sure it was even possible.
100%
200%
50%
This means Leadwerks will scale right for 4k monitors, or any other resolution.
- 10
3 Comments
Recommended Comments