Flood.GUI.Controls.TextBox.OnMouseClickedLeft C# (CSharp) Method

OnMouseClickedLeft() protected method

Handler invoked on mouse click (left) event.
protected OnMouseClickedLeft ( int x, int y, bool down ) : void
x int X coordinate.
y int Y coordinate.
down bool If set to true mouse button is down.
return void
        protected override void OnMouseClickedLeft(int x, int y, bool down)
        {
            base.OnMouseClickedLeft(x, y, down);
            if (m_SelectAll)
            {
                OnSelectAll(this);
                //m_SelectAll = false;
                return;
            }

            int c = GetClosestCharacter(x, y);

            if (down)
            {
                CursorPos = c;

                if (!Input.InputHandler.IsShiftDown)
                    CursorEnd = c;

                InputHandler.MouseFocus = this;
            }
            else
            {
                if (InputHandler.MouseFocus == this)
                {
                    CursorPos = c;
                    InputHandler.MouseFocus = null;
                }
            }
        }