예제 #1
0
 public XenString()
 {
     _type              = XenStringType.String;
     Text               = null;
     _nextString        = null;
     SpriteFont         = null;
     IsTemporary        = false;
     FloatDecimalPlaces = _defaultDecimalPlaces;
 }
예제 #2
0
        public void Reset(SpriteFont spriteFont, StringBuilder text)
        {
            _type              = XenStringType.String;
            Text               = text;
            _nextString        = null;
            SpriteFont         = spriteFont;
            IsTemporary        = false;
            FloatDecimalPlaces = _defaultDecimalPlaces;

            if (SpriteFont != null)
            {
                RenderingExtent.Reset(SpriteFont.MeasureString(text));
            }
        }
예제 #3
0
        public void Reset(StringBuilder text)
        {
            _type       = XenStringType.String;
            Text        = text;
            _nextString = null;
            // TODO: Implement default SpriteFont!
            //SpriteFont = Globals.;
            IsTemporary        = false;
            FloatDecimalPlaces = _defaultDecimalPlaces;

            if (SpriteFont != null)
            {
                RenderingExtent.Reset(SpriteFont.MeasureString(text));
            }
        }
예제 #4
0
        public void Reset(SpriteFont spriteFont, float value, uint decimalPlaces)
        {
            _type              = XenStringType.Float;
            ValueFloat         = value;
            Text               = null;
            _nextString        = null;
            SpriteFont         = spriteFont;
            IsTemporary        = false;
            FloatDecimalPlaces = decimalPlaces;

            if (SpriteFont != null)
            {
                RenderingExtent.Reset(SpriteBatchEx.MeasureDecimalString(SpriteFont, value, decimalPlaces));
            }
        }
예제 #5
0
        public void Reset(SpriteFont spriteFont, int value)
        {
            _type              = XenStringType.Integer;
            ValueInt           = value;
            Text               = null;
            _nextString        = null;
            SpriteFont         = spriteFont;
            IsTemporary        = false;
            FloatDecimalPlaces = _defaultDecimalPlaces;

            if (SpriteFont != null)
            {
                RenderingExtent.Reset(SpriteBatchEx.MeasureIntegerString(SpriteFont, value));
            }
        }