Example #1
0
        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;
        }
Example #2
0
 public TextBoxChar(string charString, Size charSize, CharOptions options)
 {
     Char        = charString;
     CharSize    = charSize;
     CharColor   = options.ForeColor;
     CharOptions = options;
 }
Example #3
0
 public TextBoxChar(string charString, Size charSize, CharOptions options)
 {
     Char = charString;
     CharSize = charSize;
     CharColor = options.ForeColor;
     CharOptions = options;
 }
Example #4
0
 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;
     }
 }
Example #5
0
        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;
            }
        }
Example #6
0
 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;
 }