private void DrawKeywordValue(KeywordValue value)
        {
            GUILayout.BeginVertical();

            GUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel("Name");
            value.value = EditorGUILayout.TextField(value.value, GUILayout.MaxWidth(EditorConfig.RegularTextFieldWidth));
            GUILayout.EndHorizontal();

            GUILayout.EndVertical();
        }
 private void CreateCurrentKeywordValuesList()
 {
     currentKeywordValuesList = EditorUtils.SetupReorderableList("Values", currentKeyword.values, ref currentKeywordValue, (rect, x) =>
     {
         EditorGUI.LabelField(new Rect(rect.x, rect.y, 200, EditorGUIUtility.singleLineHeight), x.value);
     },
                                                                 (x) =>
     {
         currentKeywordValue = x;
     },
                                                                 () =>
     {
         var value = new KeywordValue();
         currentKeyword.values.Add(value);
     },
                                                                 (x) =>
     {
         currentKeywordValue = null;
     });
 }
 public KeywordEditor(GameConfiguration config) : base(config)
 {
     keywordList = EditorUtils.SetupReorderableList("Keywords", gameConfig.keywords, ref currentKeyword, (rect, x) =>
     {
         EditorGUI.LabelField(new Rect(rect.x, rect.y, 200, EditorGUIUtility.singleLineHeight), x.name);
     },
                                                    (x) =>
     {
         currentKeyword      = x;
         currentKeywordValue = null;
         CreateCurrentKeywordValuesList();
     },
                                                    () =>
     {
         var keyword = new Keyword();
         gameConfig.keywords.Add(keyword);
     },
                                                    (x) =>
     {
         currentKeyword      = null;
         currentKeywordValue = null;
     });
 }