Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // From http://blogs.floriancavallo.fr/post/2012/07/17/Unity-Creer-une-interface-de-Login.aspx
- public class UserInterface : MonoBehaviour {
- public string username ;
- public string password;
- private Rect windowRect = new Rect (200, 150, 350, 250);
- void OnGUI(){
- windowRect = GUI.Window (0, windowRect, WindowFunction, "Identification");
- }
- void WindowFunction (int windowID) {
- GUIStyle LoginStyle = new GUIStyle();
- LoginStyle.fontSize= 13 ;
- LoginStyle.normal.textColor = Color.black;
- GUI.Label(new Rect(90,50,150,25),"Login :",LoginStyle);
- GUI.Label(new Rect(90,100,150,25),"Password :",LoginStyle);
- username = GUI.TextField(new Rect(170, 50, 150, 25), username, 20);
- password = GUI.PasswordField(new Rect(170,100,150,25),password, "*"[0], 25);
- if (GUI.Button(new Rect(125,175,100,25), "Login")){
- //makeLogin(username, password);
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement