Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "SFML\Graphics.hpp"
- #include <iostream>
- struct windowVars
- {
- int windowWidth = 640;
- int windowHeight = 480;
- std::string WindowTitle = "Platformer";
- sf::Event ev;
- };
- int main()
- {
- windowVars winVar;
- sf::RenderWindow win(sf::VideoMode(winVar.windowWidth, winVar.windowHeight), winVar.WindowTitle);
- while (win.isOpen())
- {
- while (win.pollEvent(winVar.ev))
- {
- switch (winVar.ev.type)
- {
- case sf::Event::Closed: win.close(); break;
- }
- }
- win.clear();
- win.display();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement