public void InsertChar(string letter, int position, CharOptions options) { Size letterSize = mFont.SizeText(letter); mChars.Insert(position, new TextBoxChar(letter, Color.Empty, letterSize)); mCurrentWidth += letterSize.Width; }
public TextBoxChar(string charString, Size charSize, CharOptions options) { Char = charString; CharSize = charSize; CharColor = options.ForeColor; CharOptions = options; }
public void AddChar(string letter, CharOptions options) { Size letterSize = mFont.SizeText(letter); if (letter == "\n") letterSize.Width = 0; if (mCurrentWidth + letterSize.Width < mMaxWidth) { mChars.Add(new TextBoxChar(letter, letterSize, options)); mCurrentWidth += letterSize.Width; } }
public void AddChar(string letter, CharOptions options) { Size letterSize = mFont.SizeText(letter); if (letter == "\n") { letterSize.Width = 0; } if (mCurrentWidth + letterSize.Width < mMaxWidth) { mChars.Add(new TextBoxChar(letter, letterSize, options)); mCurrentWidth += letterSize.Width; } }