Jump to content
  • entries
    941
  • comments
    5,894
  • views
    867,579

Resolution Independence


Josh

1,954 views

 Share

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%

blogentry-1-0-45224500-1472581459_thumb.jpg

 

200%

blogentry-1-0-88824800-1472581464_thumb.jpg

 

50%

blogentry-1-0-92167700-1472581470_thumb.jpg

 

This means Leadwerks will scale right for 4k monitors, or any other resolution.

  • Upvote 10
 Share

3 Comments


Recommended Comments

Really cool is right, looks like you're taking your time and doing an awesome job of the LeadwerksGUI system.. can't wait til it's done!

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...