Spryt.ToolPanel.ToolPanel C# (CSharp) Method

ToolPanel() public method

public ToolPanel ( ) : System
return System
        public ToolPanel()
        {
            InitializeComponent();

            myToolBtns = new RadioButton[]
            {
                selectBtn, areaBtn, wandBtn,
                pencilBtn, boxBtn, fillBtn
            };

            for ( int i = 0; i < myToolBtns.Length; ++i )
            {
                Tool tool = (Tool) i;
                myToolBtns[ i ].Click += ( sender, e ) =>
                {
                    CurrentTool = tool;
                };
            }

            CurrentTool = Tool.Pencil;
        }