Feche1320 Posted May 10, 2011 Share 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 Link to comment
TEDERIs Posted May 11, 2011 Share 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 Link to comment
Antibird Posted May 11, 2011 Share Posted May 11, 2011 Don't bother calculating guiSetProperty( window, "VerticalAlignment", "Centre" ) guiSetProperty( window, "HorizontalAlignment", "Centre" ) Link to comment
Feche1320 Posted May 11, 2011 Author Share 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! 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