21 lines
671 B
C#
21 lines
671 B
C#
using DaggerFramework.Rendering;
|
|
using System.Drawing;
|
|
|
|
namespace DaggerFramework.SceneGraph
|
|
{
|
|
public class Text2d : Drawable2d
|
|
{
|
|
public string Contents { get => _contents; set => _contents = value; }
|
|
public int FontSize { get => _fontSize; set => _fontSize = value; }
|
|
public Color FontColor { get => _fontColor; set => _fontColor = value; }
|
|
|
|
public override void OnDraw(Renderer renderer)
|
|
{
|
|
renderer.DrawDebugText(Position, _contents, _fontSize, _fontColor);
|
|
}
|
|
|
|
private string _contents = string.Empty;
|
|
private int _fontSize = 16;
|
|
private Color _fontColor = Color.White;
|
|
}
|
|
} |