Jump to content

GUI/DX Fit All Screens


Recommended Posts

Hey there,

I am using the basic way to set for all screens -

local sx,sy = guiGetScreenSize() 
local px,py = 1024,760    
local x,y =  (sx/px), (sy/py) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(x*300, y*250, x*420, y*240, "img/login.png", false)  

It works great on my screen, but for others it comes out weird. Any way I can fix this?

When I try with his resolution 1600x900 it comes out weird on my screen. Any solutions?

Link to comment
Hey there,

I am using the basic way to set for all screens -

local sx,sy = guiGetScreenSize() 
local px,py = 1024,760    
local x,y =  (sx/px), (sy/py) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(x*300, y*250, x*420, y*240, "img/login.png", false)  

It works great on my screen, but for others it comes out weird. Any way I can fix this?

When I try with his resolution 1600x900 it comes out weird on my screen. Any solutions?

Test:

local px,py = 1360,768     

Link to comment

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...