Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SFML/Graphics.hpp>
- int main()
- {
- sf::RenderWindow window(sf::VideoMode::getDesktopMode(), "");
- while (window.isOpen())
- {
- sf::Event event;
- while (window.pollEvent(event))
- {
- switch (event.type)
- {
- case sf::Event::Closed:
- window.close();
- break;
- case sf::Event::LostFocus:
- window.setActive(false);
- break;
- case sf::Event::GainedFocus:
- window.setActive(true);
- break;
- }
- }
- window.clear(sf::Color::White);
- window.display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement