SadConsoleEditor.Editors.GameObjectEditor.ToolsListBox_SelectedItemChanged C# (CSharp) Method

ToolsListBox_SelectedItemChanged() private method

private ToolsListBox_SelectedItemChanged ( object sender, SadConsole e ) : void
sender object
e SadConsole
return void
        private void ToolsListBox_SelectedItemChanged(object sender, SadConsole.Controls.ListBox<SadConsole.Controls.ListBoxItem>.SelectedItemEventArgs e)
        {
            Tools.ITool tool = e.Item as Tools.ITool;

            if (e.Item != null)
            {
                selectedTool = tool;

                List<CustomPanel> newPanels = new List<CustomPanel>() { gameObjectNamePanel, animationPanel, framesPanel, toolsPanel };

                if (tool.ControlPanels != null && tool.ControlPanels.Length != 0)
                    newPanels.AddRange(tool.ControlPanels);

                panels = newPanels.ToArray();
                EditorConsoleManager.ToolsPane.RedrawPanels();

                //if (tool is Tools.EntityCenterTool)
                //{
                //    textSurface.GetLayer(LayerAnimCenter).IsVisible = true;
                //    textSurface.GetLayer(LayerBackground).IsVisible = true;

                //    //textSurface.Tint = new Color(0f, 0f, 0f, 0.2f);
                //}
                //else
                //{
                //    textSurface.GetLayer(LayerAnimCenter).IsVisible = false;
                //    textSurface.GetLayer(LayerBackground).IsVisible = false;
                //    //textSurface.Tint = new Color(0f, 0f, 0f, 1f);
                //}
            }
        }