I don't know what should I paste here exactly. But here are the events:
while(Window.pollEvent(event))
{
if(event.type==sf::Event::Closed)
Window.close();
if(event.type==sf::Event::KeyPressed)
{
if(event.key.code == sf::Keyboard::Escape)
return 1;
}
if(event.type==sf::Event::MouseButtonPressed)
{
switch(event.mouseButton.button)
{
case sf::Mouse::Left:
player.newBullet(new Pistol(player.position,sf::Vector2f(event.mouseButton.x,event.mouseButton.y),player.speed,player.radius));
break;
case sf::Mouse::Right:
player.newBullet(new Shotgun(player.position,sf::Vector2f(event.mouseButton.x,event.mouseButton.y),player.speed,player.radius));
break;
}
cout<<"button";
}
if(event.type==sf::Event::MouseMoved)
{
player.computeAim(sf::Vector2f(sf::Mouse::getPosition(Window)));
cout<<"move";
}
}
And MouseButtonPressed event doesn't work too.