public override void  OnInspectorGUI()
    {
        InstantGuiInputText script = (InstantGuiInputText)target;

        base.OnInspectorGUI();

        script.guiElementProps = EditorGUILayout.Foldout(script.guiElementProps, "InputText");
        if (script.guiElementProps)
        {
            EditorGUI.indentLevel = 1;

            //script.text = EditorGUILayout.TextField("Text:", script.text);
            script.password           = EditorGUILayout.ToggleLeft("Password", script.password);
            script.alwaysTyping       = EditorGUILayout.ToggleLeft("Always Typing", script.alwaysTyping);
            script.confirmOnEnterOnly = EditorGUILayout.ToggleLeft("Confirm on Enter Only", script.confirmOnEnterOnly);

            EditorGUILayout.Space();

            script.cursorWidth = EditorGUILayout.IntField("Cursor Width:", script.cursorWidth);
            script.cursorColor = EditorGUILayout.ColorField("Cursor Color:", script.cursorColor);
            EditorGUIUtility.LookLikeControls();
            //script.cursorTexture = (Texture2D)EditorGUILayout.ObjectField("Cursor Texture:", script.cursorTexture, typeof(Texture2D), false);

            EditorGUI.indentLevel = 0;
        }
    }
示例#2
0
        void LoginWindowPlay()
        {
            Debug.Log("Btn Login has pressed");
            InstantGuiInputText userName = (InstantGuiInputText)GameManager.GetGuiComponentWithName("userName");
            InstantGuiInputText passWord = (InstantGuiInputText)GameManager.GetGuiComponentWithName("passWord");

            Debug.Log("Data -> " + userName.text + " : " + passWord.text);
        }
示例#3
0
    static public InstantGuiInputText CreateInputText()
    {
        InstantGuiInputText element = (InstantGuiInputText)InstantGuiElement.Create("InputText", typeof(InstantGuiInputText), GetSelectedElement());

        InstantGui.ForceUpdate();
        Selection.activeGameObject = element.gameObject;
        return(element);
    }
示例#4
0
	void getObjects()
	{
		if (usernameTextbox == null) {
			usernameTextbox = GameObject.Find ("usernameTxt").GetComponent<InstantGuiInputText> ();
			musicVolumeSlider = GameObject.Find ("musicVolumeSlider").GetComponent<InstantGuiSlider> ();
			musicVolumeSlider = GameObject.Find ("soundEffectsVolumeSlider").GetComponent<InstantGuiSlider> ();
		}
	}
示例#5
0
    //Get user ID from text form.
    string GetUserID()
    {
        string userId = PlayerPrefs.GetString("USER_ID");

        if (string.IsNullOrEmpty(userId))
        {
            userId = "USER_" + Random.Range(0, 999);
        }
        return(userId);
    }
示例#6
0
    //Get user ID from text form.
    string GetUserID()
    {
        string userId = PlayerPrefs.GetString ("USER_ID");

        if (string.IsNullOrEmpty (userId)) {
            userId = "USER_" + Random.Range (0, 999);
        }
        return userId;
    }
示例#7
0
 void Start()
 {
     _labelServerSelected = (InstantGuiInputText)GameManager.GetGuiComponentWithName("labelServerSelected");
 }