Jump to content

Gui position


SkatCh

Recommended Posts

local sWidth, sHeight = guiGetScreenSize() 
local windowX, windowY = 500, 450 
local pX, pY = (sWidth/2)-(windowX/2), (sHeight/2)-(windowY/2) 
  
--Lets say you want to create a button in the center of the window: 
local X, Y = 150, 25 
local pX, pY = (windowX/2)-(X/2), (windowY/2)-(Y/2) 

Try to understand it because I can't explain it in English. :P

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