public void DrawDropShadow(SpriteBatch spriteBatch, string text, TextDrawingArgs args, Color dropShadowColor) { var textOffset = args.GetTextOffset(); var finalDropShadowColor = dropShadowColor.WithMultipliedOpacity(dropShadowColor.A / 255f * (Color.A / 255f)); spriteBatch.DrawString(GetFont(), text, args.ResultOrigin(), finalDropShadowColor, args.Angle, textOffset, 1f, SpriteEffects.None, args.Depth); }
public void Draw(SpriteBatch spriteBatch, string text, TextDrawingArgs args) { if (string.IsNullOrWhiteSpace(text)) { return; } var textOffset = args.GetTextOffset(); spriteBatch.DrawString(GetFont(), text, args.ResultOrigin(), Color, args.Angle, textOffset, 1f, SpriteEffects.None, args.Depth); }
public void DrawDropShadow(SpriteBatch spriteBatch, Color dropShadowColor, Point additionalOffset, float angle, Depth depth) { var args = new TextDrawingArgs { Origin = Origin, TopLeft = TopLeft, OffsetFromTopLeft = Offset + new Point(1), Angle = angle, AdditionalOffset = additionalOffset, Depth = depth + 1 }; Drawable.DrawDropShadow(spriteBatch, Text, args, dropShadowColor); }
public void Draw(SpriteBatch spriteBatch, Point additionalOffset, float angle, Depth depth) { var args = new TextDrawingArgs { Origin = Origin, TopLeft = TopLeft, OffsetFromTopLeft = Offset, Angle = angle, AdditionalOffset = additionalOffset, Depth = depth }; Drawable.Draw(spriteBatch, Text, args); }
private void EmptyDrawFunction(SpriteBatch spriteBatch, TextDrawingArgs args) { // this function is intentionally left blank }
public void DrawDropShadow(SpriteBatch spriteBatch, string text, TextDrawingArgs args, Color dropShadowColor) { this.drawFunction(spriteBatch, args); }
public void Draw(SpriteBatch spriteBatch, string text, TextDrawingArgs args) { this.drawFunction(spriteBatch, args); }
private void DrawFunction(SpriteBatch spriteBatch, TextDrawingArgs args) { this.spriteFrame.Draw(spriteBatch, args.FinalPosition(), 1f, args.Angle, XYBool.False, args.Depth, Color.White, false); }