예제 #1
0
        /// <summary>
        /// Changes the handler currently displayed
        /// </summary>
        /// <param name="handler">Handler.</param>
        protected virtual void ChangeEventHandler(EventHandler handler)
        {
            Reset();

            m_handler = handler;

            if (m_handler != null)
            {
                m_handler.CreateEventNode();
            }
        }
예제 #2
0
        /// <summary>
        /// Raises the GUI event.
        /// </summary>
        private void OnGUI()
        {
            FetchEventHandler();

            if (m_handler != null && m_handler.EventNode == null)
            {
                m_handler.CreateEventNode();
            }

            EditorGUIUtility.labelWidth = 80;

            if (m_handler != null)
            {
                FetchActions();

                CheckSelectedActionBox();

                CheckSelectedNode();

                DrawBackground();

                DisplayAllConnections();

                if (m_selectedNode != null)
                {
                    DisplayDrawingConnection();
                }
            }

            DisplaySidebar();

            if (m_handler != null)
            {
                DisplayBlueprint();
            }

            EditorGUIUtility.labelWidth = 0;
        }