Created
October 19, 2017 18:31
-
-
Save FRex/83ab096bacb356afcf6fabd97f7ab841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Graphics.hpp> | |
int main(int argc, char ** argv) | |
{ | |
sf::RenderWindow app(sf::VideoMode(640u, 480u), "DoubleClick"); | |
app.setFramerateLimit(60u); | |
while(app.isOpen()) | |
{ | |
sf::Event eve; | |
while(app.pollEvent(eve)) | |
{ | |
switch(eve.type) | |
{ | |
case sf::Event::Closed: | |
app.close(); | |
break; | |
case sf::Event::MouseButtonPressed: | |
std::printf("MousePress %d: %d\n", eve.mouseButton.button, eve.mouseButton.sequence); | |
break; | |
}//switch eve.type | |
} | |
app.clear(); | |
app.display(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment