started on sprite support
This commit is contained in:
17
UISprite.cs
Normal file
17
UISprite.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using OpenTK.Mathematics;
|
||||
using System.Drawing;
|
||||
|
||||
public class UISprite
|
||||
{
|
||||
public Vector2 Position; // Screen pixels (not normalized)
|
||||
public Vector2 Size; // Size in pixels
|
||||
public Rectangle TextureRegion; // Which part of atlas to use
|
||||
public Color Tint = Color.White;
|
||||
public float Rotation = 0f;
|
||||
public Vector2 Origin = Vector2.Zero; // Rotation/scale origin
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
// Draw textured quad using TextureRegion coordinates
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user