Jump to content

gui


golanu21

Recommended Posts

local x,y = guiGetScreenSize()   
local playerName = getPlayerName ( localPlayer )   
  
--Function login 
local myWindow = guiCreateWindow ( x/3.8, y/3.5, x/4.2, y/2.5, "Information", false ) 
userlog = guiCreateEdit( x/3.4, y/2.5, x/6.6, y/25, "Username", false, myWindow ) 
passlog = guiCreateEdit( x/3.4, y/1.9, x/6.6, y/25, "Password", false, myWindow ) 
butonlog = guiCreateButton(x/3.4, y/1.6, x/6.6, y/25, "Login", false, myWindow) 
regup = guiCreateButton(x/3.5, y/4, x/6.6, y/25, "Register", false, myWindow) 
  

why, userlog, passlog, butonlog, regup. .. don't show up.

Link to comment

Well, a thing that is easier to do is to use absolute values for elements inside of you window. Because you have a parent ( myWindow ). Try this;

local x, y = guiGetScreenSize(); 
local playerName = getPlayerName ( getLocalPlayer() ); 
  
local myWindow = guiCreateWindow ( x / 3.8, y / 3.5, x / 4.2, y / 2.5, "information", false ); 
userlog = guiCreateEdit ( 0.05, 0.2, 0.9, 0.15, "Username", true, myWindow ); 
passlog = guiCreateEdit ( 0.05, 0.4, 0.9, 0.15, "Password", true, myWindow ); 
butonlog = guiCreateButton ( 0.05, 0.6, 0.4, 0.1, "Login", true, myWindow ); 
regup = guiCreateButton ( 0.50, 0.6, 0.4, 0.1, "Register", true, myWindow ); 

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