Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <string>
- #include"SFML\Graphics.hpp"
- #include"SFML\Window.hpp"
- #include"SFML\System.hpp"
- using namespace std;
- using namespace sf;
- int main()
- {
- string s="sfml";
- RenderWindow window(VideoMode(600,600),s);
- window.setFramerateLimit(60);
- while (window.isOpen())
- {
- Event event;
- while (window.pollEvent(event))
- {
- if (event.type == Event::Closed)
- window.close();
- if (event.KeyPressed && event.key.code == Keyboard::Escape)
- window.close();
- switch (event.key.code)
- {
- case Keyboard::C:
- cout<<"c";break;
- }
- if (event.type==Event::KeyReleased)
- cout<<12345<<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement