Graphics: Set default sprites size to the base color texture size, if any

This commit is contained in:
SirLynix
2023-02-02 13:24:22 +01:00
parent 6508b84e5c
commit c144435d4a
3 changed files with 8 additions and 6 deletions

View File

@@ -18,9 +18,11 @@ namespace Nz
m_color(Color::White()),
m_orientation(orientation),
m_textureCoords(0.f, 0.f, 1.f, 1.f),
m_origin(0.f, 0.f),
m_size(64.f)
m_origin(0.f, 0.f)
{
Vector2ui size = Vector2ui(GetTextureSize());
m_size = (orientation == Orientation::Horizontal) ? size.x : size.y;
UpdateVertices();
}