SFML community forums
Help => Graphics => Topic started by: konig on March 10, 2014, 04:26:25 am
-
if (event.MouseButtonEvent.button == sf::Mouse::Left){
std::cout << "The left mouse button was pressed at X=" << event.MouseButtonEvent.x
<< "Y=" << event.MouseButtonEvent.y<< "." << std::endl;
}
This is my code...
I got three errors, for all the places I used MouseButtonEvent. They all of which show the same error:
invalid use of 'struct sf::Event::MouseButtonEvent'
Can somebody tell me where I'm going wrong..
Thank You
-
Please read the tutorials / documentation.
-
Maybe a look at the official tutorial (http://www.sfml-dev.org/tutorials/2.1/window-events.php) will help you understand that your usage is wrong. ;)
-
Thanks a lot both of you..especially eXpl0it3r
Sorry for the delayed reply.