Gravestone Posted March 6, 2016 Share Posted March 6, 2016 I drew an image on my login screen but the image does not work for every resolution. local Width,Height = 350,350 local x, y = guiGetScreenSize() local px, py = 1980, 1080 local sx, sy = (x/px), (x/py) Image = guiCreateStaticImage( x/2-640, y/2-360, 1980, 1280, "login_bg.png", false) Can anybody help me how do I make it work for every resolution? Link to comment
1LoL1 Posted March 6, 2016 Share Posted March 6, 2016 I drew an image on my login screen but the image does not work for every resolution. local Width,Height = 350,350 local x, y = guiGetScreenSize() local px, py = 1980, 1080 local sx, sy = (x/px), (x/py) Image = guiCreateStaticImage( x/2-640, y/2-360, 1980, 1280, "login_bg.png", false) Can anybody help me how do I make it work for every resolution? Try this but start in 800x600 resolution. x, y = guiGetScreenSize() rx, ry = (x/800), (y/600) image = guiCreateStaticImage(rx*640, ry*360, rx*1980, ry*1280, "login_bg.png",false) Link to comment
MuhannaDx Posted March 6, 2016 Share Posted March 6, 2016 local x, y = guiGetScreenSize() function Dx() Image = guiCreateStaticImage( ( x - 680 ) / 2, ( y - 520 ) / 2, 680, 520, "LoginPanel.png", false) end setTimer(Dx, 2500,1) Link to comment
thelaser Posted March 9, 2016 Share Posted March 9, 2016 Make your GUI in relative, every single label,image,button etc, it will automaticly be resized for every resolution. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now