mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
fixing rotation
This commit is contained in:
@@ -54,7 +54,6 @@ namespace mlx
|
||||
Text& new_text = p_scene->CreateText(str);
|
||||
new_text.SetPosition(Vec2f{ static_cast<float>(x), static_cast<float>(y) });
|
||||
new_text.SetColor(std::move(vec_color));
|
||||
new_text.SetCenter(Vec2f{ 0.0f, 0.0f });
|
||||
}
|
||||
else if(!p_scene->IsTextAtGivenDrawLayer(str, m_draw_layer))
|
||||
p_scene->BringToDrawLayer(text.Get(), m_draw_layer);
|
||||
@@ -72,10 +71,10 @@ namespace mlx
|
||||
m_pixelput_called = false;
|
||||
}
|
||||
Sprite& new_sprite = p_scene->CreateSprite(texture);
|
||||
new_sprite.SetCenter(Vec2f{ texture->GetWidth() / 2.0f, texture->GetHeight() / 2.0f });
|
||||
new_sprite.SetPosition(Vec2f{ static_cast<float>(x), static_cast<float>(y) });
|
||||
new_sprite.SetScale(Vec2f{ scale, scale });
|
||||
new_sprite.SetRotation(angle);
|
||||
new_sprite.SetCenter(Vec2f{ texture->GetWidth() / 2.0f, texture->GetHeight() / 2.0f });
|
||||
}
|
||||
else if(!p_scene->IsTextureAtGivenDrawLayer(texture, m_draw_layer))
|
||||
p_scene->BringToDrawLayer(sprite.Get(), m_draw_layer);
|
||||
|
||||
Reference in New Issue
Block a user