var username : String;
var password : String;
var table1 : boolean;
var table2 : boolean;
var window1 : Rect = Rect(20,20,500,500);
function Start()
{
table1 = true;
}
function OnGUI()
{
if(table2 == true)
{
window1 = GUI.Window(0,window1,firstwindow,"LOGIN WINDOW");
}
if(table1 == true)
{
GUI.color = Color.green;
GUI.Label(Rect(Screen.width*(2/6.55),Screen.height*(1.9/6.3),Screen.width* (1/6.55),Screen.height*(.6/6.3)),"USER");
GUI.Label(Rect(Screen.width*(2/6.55),Screen.height*(2.5/6.3),Screen.width*(1/6.55),Screen.height*(.6/6.3)),"PASSWORD");
username = GUI.TextArea(Rect(Screen.width*(3/6.55),Screen.height*(1.9/6.3),Screen.width*(1.5/6.55),Screen.height*(.3/6.3)),username,15);
password = GUI.PasswordField(Rect(Screen.width*(3/6.55),Screen.height*(2.5/6.3),Screen.width*(1.5/6.55),Screen.height*(.2/6.3)),password,"*"[0],10);
if(GUI.Button(Rect(Screen.width*(2.5/6.55),Screen.height*(3.5/6.3),Screen.width*(0.5/6.55),Screen.height*(.4/6.3)),"OK"))
{
table2 = true;
table1 = false;
}
}
}
Here my need is when user enter the USERNAME and PASSWORD and click ok button in the login window i have to display the WHAT ever user entered in in username and password field eg if user has entered username- robert and password- mathew in login window i have to display both robert and mathew like wise for all user