Dashboard/Quik/Controls/Label.cs

21 lines
524 B
C#
Raw Normal View History

2024-05-16 21:58:22 +02:00
using Quik.CommandMachine;
using Quik.Media;
using Quik.Typography;
namespace Quik.Controls
{
public class Label : Control
{
public string Text { get; set; }
public QFont TextFont { get; set; }
public float TextSize { get; set; }
protected override void ValidateVisual(CommandList cmd)
{
float padding = Padding;
QVec2 origin = new QVec2(padding, padding);
cmd.TypesetHorizontalDirect(Text, origin, TextSize, TextFont);
}
}
}