Azmyth.Editor.GridControl.OnMouseDown C# (CSharp) Method

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void
        protected override void OnMouseDown(MouseEventArgs e)
        {
            m_selectionShape = ToolShape;
            m_selectionSize = ToolSize;

            m_mouseDownLocation = e.Location;

            if (e.Button == MouseButtons.Left)
            {
                m_isLeftMouseDown = true;
                Invalidate();

                if (CellHover != null)
                {
                    CellHover(this, m_highlightedCellLocation);
                }
            }

            if (e.Button == MouseButtons.Right)
            {
                m_isRightMouseDown = true;
                Invalidate();
            }

            this.Focus();
        }