Jump to content

Gui Resolution "Help"


Recommended Posts

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
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
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: 7ulBz.png

Now, you have to subtract half of the window away

7ulFf.png

so it goes to the center.

Link to comment
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: 7ulBz.png

Now, you have to subtract half of the window away

7ulFf.png

so it goes to the center.

ahA! lol Thanks :D

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