Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SFML/Graphics.hpp>
- int main()
- {
- // Create main window
- sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Fonts");
- // Create a graphical string
- sf::Text Hello("Hello !\nHow are you ?");
- Hello.SetColor(sf::Color(0, 128, 128));
- Hello.SetPosition(100.f, 100.f);
- Hello.SetRotation(15.f);
- Hello.SetCharacterSize(50);
- // Start game loop
- while (App.IsOpened())
- {
- // Make the second string rotate
- Hello.Rotate(App.GetFrameTime() * 100.f);
- // Clear screen
- App.Clear();
- // Draw our strings
- App.Draw(Hello);
- // Finally, display rendered frame on screen
- App.Display();
- }
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement