//Core display fucntion private void DrawFunctions() { GUILayout.BeginVertical(); { //Dropdow list _showFunctions = EditorGUILayout.Foldout(_showFunctions, "Functions"); if (_showFunctions) { if (_self.Functions != null && _self.Functions.Count > 0) { for (int i = 0; i < _self.Functions.Count; i++) { GUILayout.BeginVertical(); { //Display function name and name field EditorCommons.FuzzyFuncName(_self.Functions[i]); //Display function body (graph) EditorCommons.FuzzyFuncBody(_self.Functions[i]); //Display function begin coordinates EditorCommons.FuzzyBeginCoord(_self.Functions[i]); //Display function end coordinates EditorCommons.FuzzyEndCoord(_self.Functions[i]); } GUILayout.EndVertical(); GUILayout.Space(_defaultSpacing); } } } } GUILayout.EndVertical(); }
private void DisplayConceptAndFunctions() { if (displayer.DisplayConcepts = EditorGUILayout.Foldout(displayer.DisplayConcepts, "Concept List")) { for (int index = 0; index < target.ConceptList.Count; index++) { GUILayout.BeginVertical(); { GUILayout.BeginHorizontal(); { displayer.SetDisplayFunctionOfConceptState( EditorGUILayout.Foldout(displayer.DisplayFunctionsOfConcept(index), displayer.GetConceptName(index)), index); EditorGUILayout.ObjectField(target.ConceptList[index], typeof(Concept), false); //Editable box with the concept value if (target.SetConceptValue(index, EditorGUILayout.FloatField(target.ConceptList[index].Value, GUILayout.Width(50)))) { EditorUtility.SetDirty(target.GetConcept(index)); } } GUILayout.EndHorizontal(); if (displayer.DisplayFunctionsOfConcept(index)) { foreach (Function func in target.ConceptList[index].Functions) { EditorCommons.FuzzyFuncName(func); EditorCommons.FuzzyFuncBody(func); EditorCommons.FuzzyBeginCoord(func); EditorCommons.FuzzyEndCoord(func); GUILayout.Space(EditorCommons._defaultSpacing); } } } GUILayout.EndVertical(); } GUILayout.Space(EditorCommons._defaultSpacing); } }