Пример #1
0
        void DeleteCharacter()
        {
            if (newState.IsKeyDown(Keys.Back) && oldState.IsKeyUp(Keys.Back) && Text.Length > 0)
            {
                Text              = Text.Remove(Text.Length - 1, 1);
                CurrentTextIndex -= 1;

                if (Text.Length > 0)
                {
                    MoveTextForward(Text[Text.Length - 1].ToString());
                    TextSize.X -= (int)fontRenderer.MeasureString(Text[Text.Length - 1].ToString()).X;
                }
            }
        }