Пример #1
0
        public void OnGUI()
        {
            key = EditorGUILayout.TextField("Key: ", key);
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Value:", GUILayout.MaxWidth(50));

            EditorStyles.textArea.wordWrap = true;
            value = EditorGUILayout.TextArea(value, EditorStyles.textArea,
                                             GUILayout.Height(100), GUILayout.Width(400));
            EditorGUILayout.EndHorizontal();

            if (GUILayout.Button("Add"))
            {
                if (!LocalizationSystem.GetLocalizedValue(key).Equals(string.Empty))
                {
                    LocalizationSystem.EditEntry(key, value);
                }
                else
                {
                    LocalizationSystem.AddEntry(key, value);
                }
            }

            minSize = new Vector2(460, 250);
            maxSize = minSize;
        }