public static void Open() { TextLocaliserGUIEditorAlertWindow window = new TextLocaliserGUIEditorAlertWindow(); window.titleContent = new GUIContent("Localiser"); window.ShowUtility(); }
static void DrawAddButton(Rect position, string key) { Texture searchIcon = (Texture)Resources.Load("store"); GUIContent _content = new GUIContent(searchIcon); if (!CheckIsValid(key)) { if (GUI.Button(position, _content)) { if (!CheckIsValid(key)) { TextLocaliserGUIEditorAlertWindow.Open(key); } } } }
static void DrawAddButton(string key) { Texture searchIcon = (Texture)Resources.Load("store"); GUIContent _content = new GUIContent(searchIcon); if (!CheckIsValid(key)) { if (GUILayout.Button(_content, GUILayout.MaxHeight(17), GUILayout.MaxWidth(17))) { if (!CheckIsValid(key)) { TextLocaliserGUIEditorAlertWindow.Open(key); } } } }
public void OnGUI() { EditorGUILayout.LabelField("Key: ", key); localisationValue = TextLocaliserGUIEditorAlertWindow.DrawToolbar(localisationValue); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Value:", GUILayout.MaxWidth(50)); EditorStyles.textArea.wordWrap = true; localisationValue = EditorGUILayout.TextArea(localisationValue, EditorStyles.textArea, GUILayout.Height(180), GUILayout.Width(400)); EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Add")) { TextLocalisation.ReplaceValue(localisationValue, key); TextLocalisation.Refresh(); Close(); } minSize = new Vector2(460, 280); maxSize = minSize; }