Beispiel #1
0
    private void DisplayNewElementMenu()
    {
        EditorGUILayout.Space(spacingSize);

        // New element fields
        EditorGUILayout.LabelField("New Element");

        EditorGUILayout.BeginVertical(GUI.skin.box);

        newKey = EditorGUILayout.TextField(newKey);
        newValue = EditorGUILayout.TextArea(newValue, GUILayout.MinHeight(60));

        // New element actions
        if (GUILayout.Button("Add Element"))
        {
            language.AddElement(newKey, newValue);

            GUI.FocusControl("");

            newKey = "";
            newValue = "";
        }

        EditorGUILayout.EndVertical();
    }