Jump to content

Gui resolution


botanist

Recommended Posts

Posted

How to prevent my gui from being f*cked up in different resolutions? I'm already using relative values, but like the admin resource: It will look in every resolution the same. How to do that?

Posted
How to prevent my gui from being f*cked up in different resolutions?

...

Not how to get screen size.

@ Name: Well, this one is old :P Using SilentStrike way, way more.

  • Discord Moderators
Posted (edited)

you must code 'manual relative' as I call it

get GUI size, and set some absolute amount of pixels from it.

example:

local x, y = guiGetScreenSize () 
    windowX, windowY = (x / 2) - (windowWidth / 2), (y / 2) - (windowHeight / 2) 

will center a window.

You should code a GUI absolutely and then move the window. The stuff will stay because it is child of window, and so it will look alike and can be placed alike on all resolutions.

edit: parentheses fail :P

Edited by Guest

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...