Пример #1
0
        public static void Open()
        {
            if (StoryWindow != null)
            {
                StoryWindow.Show();
                return;
            }
            StoryWindow = EditorWindow.GetWindow <StoryEditorWindow>();
            StoryWindow.titleContent = new GUIContent("Story Editor");
            //float h = Screen.height * 0.7f;
            //float w = Screen.width * 0.7f;
            //StoryWindow.position = new Rect(Screen.width - w, Screen.height - h, w, h);

            StoryWindow.Show();
        }
Пример #2
0
        public bool OnGUI(StoryEditorWindow window)
        {
            //if (!Selection.activeObject) { ShowTips(window._windowRect.center); return true; }

            StoryObject story = Selection.activeObject as StoryObject;

            window._storyObject = story;
            if (story == null)
            {
                ShowTips(window._windowRect.center);
                return(true);
            }

            return(false);
        }
Пример #3
0
        public void OnGUI(StoryEditorWindow window, NodeModifier[] nodes)
        {
            _contentRect = window._contentRect;
            _window      = window;

            //========Right Area===============
            DrawRightGrid();
            DrawNodes(nodes, true);
            ShowConnectLine();
            //========Left Slider Area===========
            ShowLeftSliderArea();
            //Make graph dragable
            DragGraph();
            //Quilk Key
            QuilkKey();
            //LeftTopInfo
            ShowGraphCenterInfo();
            //MultiChoice
            MultiChoice();

            InternalOnGUI();
        }
Пример #4
0
        public static void Open()
        {
            if (StoryWindow != null)
            {
                StoryWindow.Show();
                return;
            }
            StoryWindow = EditorWindow.CreateInstance<StoryEditorWindow>();
            StoryWindow.titleContent = new GUIContent("Story Editor");
            float h = Screen.height * 0.7f;
            float w = Screen.width * 0.7f;
            StoryWindow.position = new Rect(Screen.width - w, Screen.height - h, w, h);

            StoryWindow.Show();
        }
Пример #5
0
 void Update()
 {
     Repaint();
     StoryWindow = this;
     //Debug.Log("dd");
 }
Пример #6
0
 void OnEnable()
 {
     StoryWindow = this;
     Repaint();
 }
Пример #7
0
 void Update()
 {
     Repaint();
     StoryWindow = this;
     //Debug.Log("dd");
 }
Пример #8
0
 void OnEnable()
 {
     StoryWindow = this;
     Repaint();
 }