Commit 4cd68df2 authored by Francois Foltete's avatar Francois Foltete
Browse files

modif infoSheet

parent e90fb5b2
......@@ -51,6 +51,9 @@ Student::infoSheet()
double
Student::moyenneGenerale() const
{
if(grades.empty())
return -1;
double res = 0;
double sommeCoeff = 0;
for (const auto &kv : grades) {
......
......@@ -16,9 +16,17 @@ InfoSheet::render()
{
centerNextWindow(500, 320);
if (ImGui::Begin("Fiche d'info", nullptr, ImGuiWindowFlags_NoMove)) {
ImGui::LabelText("Satisfaction", "I can't get no");
ImGui::LabelText("Humeur", "jsp");
ImGui::LabelText("Moyenne générale", "%lf", student->moyenneGenerale());
ImGui::LabelText("Nom","%s",student->getSurname().c_str());
ImGui::LabelText("Prénom","%s",student->getFirstName().c_str());
ImGui::LabelText("Compétence","%1.f/10",student->getSkill());
ImGui::LabelText("Motivation", "%1.f/10", student->getMotivation());
ImGui::LabelText("Humeur", "%.1f/10",student->getMood());
double moyG = student->moyenneGenerale();
if( moyG == -1.f)
ImGui::LabelText("Moyenne générale","Aucune note");
else
ImGui::LabelText("Moyenne générale","%1.f",moyG);
if (ImGui::Button("Revenir"))
Game::removeComponent(this);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment