diff --git a/src/Animation/Menu.cpp b/src/Animation/Menu.cpp index 34cf6a9..889a3fa 100644 --- a/src/Animation/Menu.cpp +++ b/src/Animation/Menu.cpp @@ -82,11 +82,11 @@ Menu::Menu(std::shared_ptr const& mesh, unsigned int nbPatell textsMenu[i][6].setPosition(fontSize*13, (fontSize+10)*(1+i)); for (unsigned int k = 0; k < 7; k++) - textsMenu[i][k].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[i][k].setFillColor(sf::Color(50, 50, 50, 170)); - textsMenu[0][0].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[0][1].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[0][2].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[0][0].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[0][1].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[0][2].setFillColor(sf::Color(200, 200, 200, 170)); } } @@ -98,54 +98,54 @@ void Menu::manageEvent(sf::Event const& event) switch (event.key.code) { case sf::Keyboard::Right: - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); angleIndex = (angleIndex+1)%3; - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); break; case sf::Keyboard::Up: - textsMenu[patellaIndex][0].setColor(sf::Color(50, 50, 50, 170)); - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][0].setFillColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); patellaIndex = (patellaIndex+nbPatellas-1)%nbPatellas; - textsMenu[patellaIndex][0].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][0].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); break; case sf::Keyboard::Left: - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); angleIndex = (angleIndex+2)%3; - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); break; case sf::Keyboard::Down: - textsMenu[patellaIndex][0].setColor(sf::Color(50, 50, 50, 170)); - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][0].setFillColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); patellaIndex = (patellaIndex+1)%nbPatellas; - textsMenu[patellaIndex][0].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[patellaIndex][1+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][0].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][1+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); break; case sf::Keyboard::Add: - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); mesh->rotations.applyPath(mesh->paths[patellaIndex]).node[angleIndex] = std::fmod((mesh->rotations.applyPath(mesh->paths[patellaIndex]).node[angleIndex]+rotationSpeed),360); textsMenu[patellaIndex][2+2*angleIndex].setString(boost::lexical_cast(mesh->rotations.applyPath(mesh->paths[patellaIndex]).node[angleIndex])); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); break; case sf::Keyboard::Subtract: - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(50, 50, 50, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(50, 50, 50, 170)); mesh->rotations.applyPath(mesh->paths[patellaIndex]).node[angleIndex] = std::fmod((mesh->rotations.applyPath(mesh->paths[patellaIndex]).node[angleIndex]+360-rotationSpeed),360); textsMenu[patellaIndex][2+2*angleIndex].setString(boost::lexical_cast(mesh->rotations.applyPath(mesh->paths[patellaIndex]).node[angleIndex])); - textsMenu[patellaIndex][2+2*angleIndex].setColor(sf::Color(200, 200, 200, 170)); + textsMenu[patellaIndex][2+2*angleIndex].setFillColor(sf::Color(200, 200, 200, 170)); break; default: