mirror of
https://github.com/SFML/SFML.git
synced 2025-01-19 07:45:13 +08:00
minor update of Cocoa-SFML example
This commit is contained in:
parent
2720532d63
commit
adca58059c
@ -46,7 +46,9 @@ struct SFMLmainWindow
|
|||||||
logo.SetSmooth(true);
|
logo.SetSmooth(true);
|
||||||
|
|
||||||
sprite.SetTexture(logo, true);
|
sprite.SetTexture(logo, true);
|
||||||
sprite.SetOrigin(sprite.GetSize() / 2.f);
|
sf::FloatRect rect = sprite.GetLocalBounds();
|
||||||
|
sf::Vector2f size(rect.Width, rect.Height);
|
||||||
|
sprite.SetOrigin(size / 2.f);
|
||||||
sprite.Scale(0.3, 0.3);
|
sprite.Scale(0.3, 0.3);
|
||||||
|
|
||||||
unsigned int ww = renderWindow.GetWidth();
|
unsigned int ww = renderWindow.GetWidth();
|
||||||
|
Loading…
Reference in New Issue
Block a user