Title bar display and closing problem
-
Hello, I'm a beginner in C++ and SFML for game creation under linux(Pop!_OS 22.04 LTS). I tested the code on the official SFML website, everything seems to work but the title bar doesn't display; it's the same with other codes. I need your help, please. Here is an example of a code I tested:
#include
#include
#include
#include
#includeint main()
{
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Titlebar);
sf::Event ev;while(window.isOpen()){ while(window.pollEvent(ev)){ switch(ev.type){ case sf::Event::Closed: window.close(); break; case sf::Event::KeyPressed: if(ev.key.code == sf::Keyboard::Escape){ window.close(); break; } default: break; } } //Render window.clear(sf::Color::Blue); window.display(); } return 0;
}
-
Hello, I'm a beginner in C++ and SFML for game creation under linux(Pop!_OS 22.04 LTS). I tested the code on the official SFML website, everything seems to work but the title bar doesn't display; it's the same with other codes. I need your help, please. Here is an example of a code I tested:
#include
#include
#include
#include
#includeint main()
{
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Titlebar);
sf::Event ev;while(window.isOpen()){ while(window.pollEvent(ev)){ switch(ev.type){ case sf::Event::Closed: window.close(); break; case sf::Event::KeyPressed: if(ev.key.code == sf::Keyboard::Escape){ window.close(); break; } default: break; } } //Render window.clear(sf::Color::Blue); window.display(); } return 0;
}
-
Ok. I'll post it in SFML forum.