Browse Source

Add disclosure rectangle on Variables panel #104

master
chrisgregan 10 years ago
parent
commit
2bf17e6920
  1. 12
      Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs

12
Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs

@ -82,6 +82,12 @@ namespace Fungus
{ {
t.variablesExpanded = true; t.variablesExpanded = true;
} }
// Draw disclosure triangle
Rect lastRect = GUILayoutUtility.GetLastRect();
lastRect.x += 5;
lastRect.y += 5;
EditorGUI.Foldout(lastRect, false, "");
} }
else else
{ {
@ -132,6 +138,12 @@ namespace Fungus
t.variablesExpanded = false; t.variablesExpanded = false;
} }
// Draw disclosure triangle
Rect lastRect = buttonRect;
lastRect.x += 5;
lastRect.y += 5;
EditorGUI.Foldout(lastRect, true, "");
Rect plusRect = listRect; Rect plusRect = listRect;
plusRect.x += plusRect.width - plusWidth; plusRect.x += plusRect.width - plusWidth;
plusRect.y -= plusHeight - 1; plusRect.y -= plusHeight - 1;

Loading…
Cancel
Save