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; } }
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); }
static public InstantGuiInputText CreateInputText() { InstantGuiInputText element = (InstantGuiInputText)InstantGuiElement.Create("InputText", typeof(InstantGuiInputText), GetSelectedElement()); InstantGui.ForceUpdate(); Selection.activeGameObject = element.gameObject; return(element); }
void getObjects() { if (usernameTextbox == null) { usernameTextbox = GameObject.Find ("usernameTxt").GetComponent<InstantGuiInputText> (); musicVolumeSlider = GameObject.Find ("musicVolumeSlider").GetComponent<InstantGuiSlider> (); musicVolumeSlider = GameObject.Find ("soundEffectsVolumeSlider").GetComponent<InstantGuiSlider> (); } }
//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); }
//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; }
void Start() { _labelServerSelected = (InstantGuiInputText)GameManager.GetGuiComponentWithName("labelServerSelected"); }