Hey, new to the forums and SFML in general.
Just trying to follow this "
http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx" tutorial and porting it over to SFML 2.0 in the process. I cannot for the life of me get the mouse position in part 3 to port.
here is the code I am trying to port:
sf::Event menuEvent;
if(menuEvent.type == sf::Event::MouseButtonPressed) {
return sf::Event::MouseButtonEvent.x;
return sf::Event::MouseButtonEvent.y;
}
Just ignore that I returned twice for the sace of the this.
How should I be doing this? I tried a few variants:
sf::Event menuEvent;
if(menuEvent.type == sf::Event::MouseButtonPressed) {
return menuEvent.MouseButtonEvent.x;
return menuEvent.MouseButtonEvent.y;
}
But this doesn't work. Any ideas?
And one more quick question, when should I be using '::' or when should I be using '.' a full stop?