Пример #1
0
        private void OnGUI()
        {
            if (m_btAsset != null)
            {
                Rect navHistoryRect = new Rect(0.0f, 0.0f, position.width, 20.0f);
                Rect optionsRect    = new Rect(position.width - 20.0f, 0.0f, 20.0f, 20.0f);
                Rect footerRect     = new Rect(0.0f, position.height - 18.0f, position.width, 20.0f);
                Rect canvasRect     = new Rect(0.0f, navHistoryRect.yMax, position.width, position.height - (footerRect.height + navHistoryRect.height));
                Rect debugRect      = new Rect(optionsRect.x - 60, 0.0f, 60.0f, 20.0f);

                BTEditorStyle.EnsureStyle();
                m_grid.DrawGUI(position.size);
                m_graph.DrawGUI(canvasRect);
                m_canvas.HandleEvents(canvasRect, position.size);
                m_hotkeyHandler.HandlerEvents();
                DrawNavigationHistory(navHistoryRect);
                DrawFooter(footerRect);
                DrawOptions(optionsRect);
                DrawDebug(debugRect);

                if (m_canvas.IsDebuging)
                {
                    OnRepaint();
                }
            }
        }
Пример #2
0
 public override void OnInspectorGUI()
 {
     if (m_inspector != null)
     {
         BTEditorStyle.EnsureStyle();
         m_inspector.DrawGUI();
         Repaint();
     }
     else
     {
         EditorGUILayout.HelpBox("There are no values to display!", MessageType.Error);
     }
 }