private void OnGUI() { Event e = Event.current; languageName = EditorGUILayout.TextField(languageName, GUILayout.Height(position.height - 30), GUILayout.Height(textFieldSize)); if (GUILayout.Button("Add") || (Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.KeypadEnter)) { //LocalizeWindow.data.languages.Add (languageName, new Dictionary<string, string>()); // LocalizeWindow.options.Add(languageName); LocalizationManager.AddLang(languageName); tool.Repaint(); this.Close(); } }