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

RefreshCursorBounds() protected method

protected RefreshCursorBounds ( ) : void
return void
        protected virtual void RefreshCursorBounds()
        {
            m_LastInputTime = Platform.Neutral.GetTimeInSeconds();

            MakeCaretVisible();

            var pA = GetCharacterPosition(m_CursorPos);
            var pB = GetCharacterPosition(m_CursorEnd);

            m_SelectionBounds.X = (int) Math.Min(pA.X, pB.X);
            m_SelectionBounds.Y = TextY - 1;
            m_SelectionBounds.Width = (int) (Math.Max(pA.X, pB.X) - m_SelectionBounds.X + 0.5);
            m_SelectionBounds.Height = TextHeight + 2;

            m_CaretBounds.X = (int) pA.X;
            m_CaretBounds.Y = TextY - 1;
            m_CaretBounds.Width = 1;
            m_CaretBounds.Height = TextHeight + 2;

            Redraw();
        }