2016-04-25 14:48:39 +00:00
|
|
|
|
using System.Drawing;
|
|
|
|
|
using Font = System.Drawing.Font;
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Rendering
|
|
|
|
|
{
|
|
|
|
|
//mxd. TextLabel wrapper
|
|
|
|
|
public abstract class CustomTextLabel : ITextLabel
|
|
|
|
|
{
|
|
|
|
|
protected TextLabel label; // Derived classes must create this!
|
|
|
|
|
|
|
|
|
|
// Required to render text label
|
|
|
|
|
public bool SkipRendering { get { return label.SkipRendering; } }
|
|
|
|
|
public Texture Texture { get { return label.Texture; } }
|
|
|
|
|
public VertexBuffer VertexBuffer { get { return label.VertexBuffer; } }
|
|
|
|
|
public Font Font { get { return label.Font; } set { label.Font = value; } }
|
|
|
|
|
public string Text { get { return label.Text; } set { label.Text = value; } }
|
|
|
|
|
|
|
|
|
|
// Access/setup
|
|
|
|
|
public TextLabel TextLabel { get { return label; } }
|
|
|
|
|
public PixelColor Color { get { return label.Color; } set { label.Color = value; } }
|
|
|
|
|
public PixelColor BackColor { get { return label.BackColor; } set { label.BackColor = value; } }
|
|
|
|
|
public SizeF TextSize { get { return label.TextSize; } }
|
|
|
|
|
|
2019-08-15 00:52:21 +00:00
|
|
|
|
public void Update(RenderDevice graphics, float translatex, float translatey, float scalex, float scaley)
|
2016-04-25 14:48:39 +00:00
|
|
|
|
{
|
2019-08-15 00:52:21 +00:00
|
|
|
|
label.Update(graphics, translatex, translatey, scalex, scaley);
|
2016-04-25 14:48:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|