public override void Visit(IObject parentObject)
        {
            if (parentObject is TextToken2D)
            {
                int currentScrollingValue = (int)(this.currentValue * this.cursorTextTo + (1 - this.currentValue) * this.cursorTextFrom);

                TextToken2D textToken2D = parentObject as TextToken2D;

                textToken2D.TextCursor = currentScrollingValue;
            }
        }
Пример #2
0
 public static int GetWidthFromTextToken(TextToken2D textToken2D)
 {
     return((int)(fontToWidths[textToken2D.TextFont] * textToken2D.CharacterSize / 1000f));
 }