This commit is contained in:
Jie
2024-06-18 10:04:50 +08:00
commit 8a494d7939
3 changed files with 56 additions and 0 deletions

28
main.cc Normal file
View File

@@ -0,0 +1,28 @@
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
int main(int argc, char** const argv){
sf::RenderWindow window(sf::VideoMode(800, 600), "mp");
sf::Texture texture;
sf::Sprite sprite;
bool running = true;
while(running){
sf::Event event;
while(window.pollEvent(event)){
if(event.type == sf::Event::Closed){
running = false;
}
if(event.type == sf::Event::KeyPressed){
if(event.key.code == sf::Keyboard::Escape){
running = false;
}
}
}
window.clear();
window.display();
}
return 0;
}