#include "Meter.hpp"
#include "../app/Assets.hpp"
#include "../creature/Creature.hpp"
+#include "../creature/Goal.hpp"
#include "../graphics/Viewport.hpp"
#include "../math/const.hpp"
#include "../world/Body.hpp"
void CreaturePanel::Draw(graphics::Viewport &viewport) noexcept {
if (!c) return;
- name->Text(c->Name());
+ std::string name_str(c->Name());
+ if (c->Dead()) {
+ name_str += " (deceased)";
+ }
+ name->Text(name_str);
age->Text(TimeString(c->Age()));
mass->Text(MassString(c->Mass()));
size->Text(LengthString(c->Size()));
live->Text(NumberString(sim.LiveCreatures().size()));
time->Text(TimeString(sim.Time()));
if (body) {
- clock->Text(TimeString(std::fmod(sim.Time(), body->RotationalPeriod())));
+ clock->Text(TimeString(std::fmod(sim.Time(), body->DayLength())) + " / " + TimeString(body->DayLength()));
} else {
clock->Text("no reference");
}
if (p > 0) {
out << std::fixed << std::setprecision(p) << n;
} else {
- out << std::defaultfloat << std::setprecision(d) << n;
+ out.unsetf(std::ios_base::floatfield);
+ out << std::setprecision(d) << n;
}
return out;
}