fliXNA_xbox.FlxText.setFormat C# (CSharp) Method

setFormat() public method

public setFormat ( Color Color, float Scale = 1.0f, SpriteFont Font = null ) : FlxText
Color Color
Scale float
Font Microsoft.Xna.Framework.Graphics.SpriteFont
return FlxText
        public FlxText setFormat(Color Color, float Scale = 1.0f, SpriteFont Font = null)
        {
            if (Font == null)
                _font = FlxG.defaultFont;
            else
                _font = Font;

            _scale = Scale;

            _regen = true;
            calcFrame();
            return this;
        }

Usage Example

Beispiel #1
0
 public FlxConsole()
     : base()
 {
     bg = new FlxSprite(80, 40);
     bg.makeGraphic((uint)FlxS.GraphicsDevice.Viewport.Width - 160, (uint)FlxS.GraphicsDevice.Viewport.Height - 80, FlxColor.WHITE * 0.45f);
     bg.Alpha = 0.5f;
     add(bg);
     ScrollFactor.X = ScrollFactor.Y = 0;
     Visible        = false;
     text           = new FlxText(100, 60, FlxS.GraphicsDevice.Viewport.Width - 160, "internal console is a work in progress", FlxG.defaultFont);
     text.setFormat(FlxColor.WHITE);
     text.Alpha = 0.75f;
     add(text);
 }
All Usage Examples Of fliXNA_xbox.FlxText::setFormat