Пример #1
0
        public static void Init(DockedPanel container)
        {
            _instance = new SidebarManager();

            _container = new SidebarContainer { Dock = DockStyle.Fill };

            if (Sledge.Settings.Layout.SidebarWidth <= 10) container.Hidden = true;
            else container.Width = Sledge.Settings.Layout.SidebarWidth;
            container.Resize += (s, e) => Sledge.Settings.Layout.SidebarWidth = container.Hidden ? 0 : container.Width;

            container.Controls.Add(_container);

            CreatePanel("Textures", new TextureSidebarPanel());
            CreatePanel("Visgroups", new VisgroupSidebarPanel());
            CreatePanel("Contextual Help", new HelpSidebarPanel());
            //CreatePanel("Entities", new EntitySidebarPanel());
            //CreatePanel("Brushes", new BrushSidebarPanel());
        }