Feche1320 Posted May 10, 2011 Posted May 10, 2011 So, with guieditor I made my gui, but when I switched resolution, it 'moved'. So, I tried this: local sx, sy = guiGetScreenSize() panel = guiCreateWindow((1113/1360)*sx,(643/768)*sy,914,536,"Extreme Gamers Admin Panel",false) But it doesn't work. Also I tried this: local sx, sy = guiGetScreenSize() panel = guiCreateWindow(247/2-sx,125/2-sy,914,536,"Extreme Gamers Admin Panel",false) But doesn't wok either, any ideas? Thanks www.host-ar.com.ar
TEDERIs Posted May 11, 2011 Posted May 11, 2011 So, with guieditor I made my gui, but when I switched resolution, it 'moved'.So, I tried this: local sx, sy = guiGetScreenSize() panel = guiCreateWindow((1113/1360)*sx,(643/768)*sy,914,536,"Extreme Gamers Admin Panel",false) But it doesn't work. Also I tried this: local sx, sy = guiGetScreenSize() panel = guiCreateWindow(247/2-sx,125/2-sy,914,536,"Extreme Gamers Admin Panel",false) But doesn't wok either, any ideas? Thanks Set the window in the center of the screen: local sx, sy = guiGetScreenSize() panel = guiCreateWindow(sx/2-457, sy/2-268, 914, 536, "Extreme Gamers Admin Panel", false) Note: screenWidth/2-windowWidth/2, screenHeight/2-windowHeight/2 This is my GitHub repository where you can find a lot of my work. And this is my YouTube channel with reviews of some resources. Good luck and enjoy MTA!
Antibird Posted May 11, 2011 Posted May 11, 2011 Don't bother calculating guiSetProperty( window, "VerticalAlignment", "Centre" ) guiSetProperty( window, "HorizontalAlignment", "Centre" )
Feche1320 Posted May 11, 2011 Author Posted May 11, 2011 So, with guieditor I made my gui, but when I switched resolution, it 'moved'.So, I tried this: local sx, sy = guiGetScreenSize() panel = guiCreateWindow((1113/1360)*sx,(643/768)*sy,914,536,"Extreme Gamers Admin Panel",false) But it doesn't work. Also I tried this: local sx, sy = guiGetScreenSize() panel = guiCreateWindow(247/2-sx,125/2-sy,914,536,"Extreme Gamers Admin Panel",false) But doesn't wok either, any ideas? Thanks Set the window in the center of the screen: local sx, sy = guiGetScreenSize() panel = guiCreateWindow(sx/2-457, sy/2-268, 914, 536, "Extreme Gamers Admin Panel", false) Note: screenWidth/2-windowWidth/2, screenHeight/2-windowHeight/2 Thank you! www.host-ar.com.ar
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