Advertisement
Guest User

Untitled

a guest
Aug 4th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <SFML/Graphics.hpp>
  2.  
  3. int main()
  4. {
  5.     // Create main window
  6.     sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Fonts");
  7.  
  8.     // Create a graphical string
  9.     sf::Text Hello("Hello !\nHow are you ?");
  10.     Hello.SetColor(sf::Color(0, 128, 128));
  11.     Hello.SetPosition(100.f, 100.f);
  12.     Hello.SetRotation(15.f);
  13.     Hello.SetCharacterSize(50);
  14.  
  15.     // Start game loop
  16.     while (App.IsOpened())
  17.     {
  18.  
  19.         // Make the second string rotate
  20.         Hello.Rotate(App.GetFrameTime() * 100.f);
  21.  
  22.         // Clear screen
  23.         App.Clear();
  24.  
  25.         // Draw our strings
  26.         App.Draw(Hello);
  27.  
  28.         // Finally, display rendered frame on screen
  29.         App.Display();
  30.     }
  31.  
  32.     return EXIT_SUCCESS;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement