Ejemplo n.º 1
0
        private GLButton AddTaskAddButton(GLControl parent, Action <Data.Task> callback, bool leafTasksSelectable = true)
        {
            var button = parent.Add(new GLButton(Gui)
            {
                Text = "###"
            });

            button.SkinDisabled = addButtonDisabled;
            button.SkinEnabled  = addButtonEnabled;
            button.SkinHover    = addButtonHover;
            button.SkinPressed  = addButtonPressed;
            button.Click       += (s, e) =>
            {
                var t = Editor.TreeContainer.InnerSize;
                var p = Editor.TreeContainer.ScrollPosition;
                Editor.TreeContainer.Add(new PBTTaskBrowserForm(Gui, Editor, callback, leafTasksSelectable)
                {
                    Location = new Point(p.X + t.Width / 2 - 200, p.Y + t.Height / 2 - 225)
                });
            };
            return(button);
        }