c++ - isButtonPressed(sf::Mouse::Left) in SFML not working -


the problem boolean variable isbuttonpressed not set every time press left button on mouse. works when press exiting button in upper right corner on window.

while (window.isopen()) {         sf::event my_event;         while(window.pollevent(my_event)) {             if (my_event.type == sf::event::closed)                 window.close();             else if (my_event.type == sf::mouse::isbuttonpressed(sf::mouse::left))                 std::cout << "left_button_pressed" << std::endl;             else break;          }         window.draw(background);         window.display();     } 


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -