Jump to content

Gui position


SkatCh

Recommended Posts

Posted

hi guys i need some information about Gui position ( Center , right , left) :

i know how to put it center : (screenWidth / 2) - (windowWidth / 2), (screenHeight / 2) - (windowHeight / 2).

what about the others .

Posted
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

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