public void constructor(float X, float Y, float Width, float Height, string sText, Color cColor, SpriteFont fFont, float fScale, FlxJustification fJustification, float fAngle) { _text = sText; color = cColor; shadow = Color.Black; backColor = new Color(0xFF, 0xFF, 0xFF, 0x0); if (fFont == null) { fFont = FlxG.Font; } _font = fFont; angle = fAngle; _scale = fScale; alignment = fJustification; x = X; y = Y; width = Width; height = Height; scrollFactor = Vector2.Zero; solid = false; moves = false; recalcMeasurements(); }
/** * You can use this if you have a lot of text parameters * to set instead of the individual properties. * * @param Font The name of the font face for the text display. * @param Scale The scale of the font (in AS3 flixel, this is Size) * @param Color The color of the text in traditional flash 0xRRGGBB format. * @param Alignment A string representing the desired alignment ("left,"right" or "center"). * @param ShadowColor A uint representing the desired text shadow color in flash 0xRRGGBB format. * * @return This FlxText instance (nice for chaining stuff together, if you're into that). */ public FlxText setFormat(SpriteFont Font, float Scale, Color Color, FlxJustification Alignment, Color ShadowColor) { if (Font == null) { Font = FlxG.Font; } _font = Font; _scale = Scale; color = Color; alignment = Alignment; shadow = ShadowColor; recalcMeasurements(); return(this); }
/** * You can use this if you have a lot of text parameters * to set instead of the individual properties. * * @param Font The name of the font face for the text display. * @param Scale The scale of the font (in AS3 flixel, this is Size) * @param Color The color of the text in traditional flash 0xRRGGBB format. * @param Alignment A string representing the desired alignment ("left,"right" or "center"). * @param ShadowColor A uint representing the desired text shadow color in flash 0xRRGGBB format. * * @return This FlxText instance (nice for chaining stuff together, if you're into that). */ public FlxText setFormat(SpriteFont Font, float Scale, Color Color, FlxJustification Alignment, Color ShadowColor) { if(Font == null) Font = FlxG.Font; _font = Font; _scale = Scale; color = Color; alignment = Alignment; shadow = ShadowColor; recalcMeasurements(); return this; }
public void constructor(float X, float Y, float Width, float Height, string sText, Color cColor, SpriteFont fFont, float fScale, FlxJustification fJustification, float fAngle) { _text = sText; color = cColor; shadow = Color.Black; backColor = new Color(0xFF, 0xFF, 0xFF, 0x0); if (fFont == null) fFont = FlxG.Font; _font = fFont; angle = fAngle; _scale = fScale; alignment = fJustification; x = X; y = Y; width = Width; height = Height; scrollFactor = Vector2.Zero; solid = false; moves = false; recalcMeasurements(); }
public FlxText setFormat(string Font, float Scale, Color Color, Color ShadowColor, FlxJustification Alignment) { return(setFormat(FlxG.Content.Load <SpriteFont>(Font), Scale, Color, Alignment, ShadowColor)); }
public FlxText(float X, float Y, float Width, float Height, string Text, Color cColor, SpriteFont fFont, float fScale, FlxJustification fJustification, float fAngle) : base(X, Y) { if (Text == null) { Text = ""; } constructor(X, Y, Width, Height, Text, Color.White, FlxG.Font, 1, FlxJustification.Center, fAngle); }