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

OnKeyBackspace() protected method

Handler for Backspace keyboard event.
protected OnKeyBackspace ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool
        protected override bool OnKeyBackspace(bool down)
        {
            base.OnKeyBackspace(down);

            if (!down) return true;
            if (HasSelection)
            {
                EraseSelection();
                return true;
            }

            if (m_CursorPos == 0) return true;

            DeleteText(m_CursorPos - 1, 1);

            return true;
        }