Hello, I am new to SFML, so please excuse any questions that have obvious answers. The problem is that only the first point of the shape changes colour while the rest simply sticks to the last colour (which in this case is green) declared in the code.
Here's my code
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
if((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Num1))
Player.SetPointColor(0,sf::Color::Blue);
Player.SetPointColor(1,sf::Color::Blue);
Player.SetPointColor(2,sf::Color::Blue);
Player.SetPointColor(3,sf::Color::Blue);
if((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::R))
Player.SetPointColor(0,sf::Color::White);
Player.SetPointColor(1,sf::Color::White);
Player.SetPointColor(2,sf::Color::White);
Player.SetPointColor(3,sf::Color::White);
if((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Num2))
Player.SetPointColor(0,sf::Color::Red);
Player.SetPointColor(1,sf::Color::Red);
Player.SetPointColor(2,sf::Color::Red);
Player.SetPointColor(3,sf::Color::Red);
if((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Num3))
Player.SetPointColor(0,sf::Color::Green);
Player.SetPointColor(1,sf::Color::Green);
Player.SetPointColor(2,sf::Color::Green);
Player.SetPointColor(3,sf::Color::Green);
}