mirror of
https://github.com/eliasstepanik/2DEngine.git
synced 2026-01-11 13:08:27 +00:00
25 lines
541 B
C#
25 lines
541 B
C#
using System.Numerics;
|
|
using Raylib_cs;
|
|
using RaylibTest.Support;
|
|
|
|
namespace RaylibTest.UiComponents;
|
|
|
|
public class UiText : UiObject
|
|
{
|
|
public string Text;
|
|
public int FontSize;
|
|
public Color Color;
|
|
|
|
public UiText(Vector2 position, string text, int fontSize, Color color) : base(position)
|
|
{
|
|
Text = text;
|
|
FontSize = fontSize;
|
|
Color = color;
|
|
}
|
|
|
|
public override void Draw()
|
|
{
|
|
base.Draw();
|
|
Raylib.DrawText(Text, (int)Position.X, (int)Position.Y, FontSize, Color);
|
|
}
|
|
} |