コード例 #1
0
        public override void Update()
        {
            Instance = this;
            if (!CanUpdate())
            {
                return;
            }
            base.Update();

            //[Main window close]    or    [related node deleted] ===>  close this window
            if (SWWindowMain.Instance == null || !SWWindowMain.Instance.NodeAll().ContainsKey(node.data.id))
            {
                Close();
                return;
            }
        }
コード例 #2
0
        void DrawWin(int id)
        {
            base.DrawNodeWindow(id);
            DrawPreview(rectArea);

            if (GUI.Button(new Rect(rectBotButton.x, rectBotButton.y, rectBotButton.width - buttonHeight, rectBotButton.height), "Edit", SWEditorUI.MainSkin.button))
            {
                SWWindowDrawMask.ShowEditor(this);
            }

            if (GUI.Button(new Rect(rectBotButton.x + rectBotButton.width - buttonHeight, rectBotButton.y, buttonHeight, rectBotButton.height), "+", SWEditorUI.MainSkin.button))
            {
                data.useGray = !data.useGray;
            }

            DrawNodeWindowEnd();
        }
コード例 #3
0
 public override void Awake()
 {
     base.Awake();
     Instance = this;
 }