LiOneLMeSsIShoT Posted March 13, 2014 Share Posted March 13, 2014 I have problems with all my Guis !! ! in my server.... My Panels works fine with my resolution but with any another resolution it be reallly big, small, bad, right, left on the streen...help one of my Pannels: GUIEditor.tabpanel[1] = guiCreateTabPanel(379, 212, 499, 288, false) guiSetAlpha(GUIEditor.tabpanel[1], 0.50) Link to comment
xXMADEXx Posted March 13, 2014 Share Posted March 13, 2014 local sx, sy = guiGetScreenSize ( ) GUIEditor.tabpanel[1] = guiCreateTabPanel(sx/2-499/2, sy/2-288/2, 499, 288, false) guiSetAlpha(GUIEditor.tabpanel[1], 0.50) Link to comment
LiOneLMeSsIShoT Posted March 13, 2014 Author Share Posted March 13, 2014 local sx, sy = guiGetScreenSize ( ) GUIEditor.tabpanel[1] = guiCreateTabPanel(sx/2-499/2, sy/2-288/2, 499, 288, false) guiSetAlpha(GUIEditor.tabpanel[1], 0.50) Alright can you tell me what you did here? you just changed the x, y positions and did what? and why changed them? i want to know because i want to do this with another panels too. Link to comment
xXMADEXx Posted March 13, 2014 Share Posted March 13, 2014 local sx, sy = guiGetScreenSize ( ) GUIEditor.tabpanel[1] = guiCreateTabPanel(sx/2-499/2, sy/2-288/2, 499, 288, false) guiSetAlpha(GUIEditor.tabpanel[1], 0.50) Alright can you tell me what you did here? you just changed the x, y positions and did what? and why changed them? i want to know because i want to do this with another panels too. guiGetScreenSize returns the client's resolution size. You just have to do basic math to find the center of the client's screen (sx/2 and sy/2) So, now it returns the middle of the screen: Now, you have to subtract half of the window away so it goes to the center. Link to comment
LiOneLMeSsIShoT Posted March 13, 2014 Author Share Posted March 13, 2014 local sx, sy = guiGetScreenSize ( ) GUIEditor.tabpanel[1] = guiCreateTabPanel(sx/2-499/2, sy/2-288/2, 499, 288, false) guiSetAlpha(GUIEditor.tabpanel[1], 0.50) Alright can you tell me what you did here? you just changed the x, y positions and did what? and why changed them? i want to know because i want to do this with another panels too. guiGetScreenSize returns the client's resolution size. You just have to do basic math to find the center of the client's screen (sx/2 and sy/2) So, now it returns the middle of the screen: Now, you have to subtract half of the window away so it goes to the center. ahA! lol Thanks 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