您好我试图在sfml上编写代码在左键单击窗口后,如果页面坐标小于200和200,窗口将关闭 但我在第二部分有一些问题,所以如果页面的坐标小于200,200窗口将关闭,如何添加secound部分imean
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::MouseButtonPressed)
{
if (event.mouseButton.button == sf::Mouse::Right)
{
window.close();//saber bahramifar
}
}
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}