void OnGUISpreadsheet(Rect r) { if (m_Spreadsheet != null) { GUILayout.BeginArea(r); EditorGUILayout.BeginVertical(); EditorGUILayout.BeginHorizontal(); GUILayout.Label("Filters:"); m_Spreadsheet.OnGui_Filters(); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(2); m_Spreadsheet.OnGUI(r.width); GUILayout.Space(2); EditorGUILayout.EndHorizontal(); GUILayout.Space(2); EditorGUILayout.EndVertical(); GUILayout.EndArea(); } if (m_EventToOpenNextDraw != null) { //this must be done after at least one call of m_TreeMap.OnGUI(rectMap) //so that m_TreeMap is initialized with the appropriate rect. //otherwise the zoom area will generate NaNs. OpenHistoryEventImmediate(m_EventToOpenNextDraw); m_EventToOpenNextDraw = null; m_EventListener.OnRepaint(); } else if (m_TreeMap != null && m_TreeMap.IsAnimated()) { m_EventListener.OnRepaint(); } }
public override void OnGUI(Rect r) { if (Event.current.type == EventType.Layout) { if (m_NeedRefresh) { m_Spreadsheet.UpdateTable(); m_NeedRefresh = false; } } m_UIState.FormattingOptions.ObjectDataFormatter.forceLinkAllObject = false; if (m_Spreadsheet != null) { GUILayout.BeginArea(r); EditorGUILayout.BeginVertical(); EditorGUILayout.BeginHorizontal(); GUILayout.Label("Filters:"); m_Spreadsheet.OnGui_Filters(); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(2); m_Spreadsheet.OnGUI(r.width); GUILayout.Space(2); EditorGUILayout.EndHorizontal(); OnGUI_OptionBar(); GUILayout.Space(2); EditorGUILayout.EndVertical(); GUILayout.EndArea(); if (m_NeedRefresh) { m_EventListener.OnRepaint(); } } }