Advertisement
AllenYuan

starter

May 24th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <SFML/Graphics.hpp>
  2. #include <time.h>
  3. using namespace sf;
  4.  
  5. int main()
  6. {
  7.   RenderWindow window(VideoMode(320, 480), "The Game!"); // window config
  8.  
  9.   while (window.isOpen()) // game loop
  10.   {
  11.     Event e;
  12.     while (window.pollEvent(e)) // close window
  13.     {
  14.       if (e.type == Event::Closed)
  15.         window.close();
  16.     }
  17.  
  18.     window.clear(Color::White);
  19.     window.display();
  20.   }
  21.  
  22.   return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement