]> git.localhorst.tv Git - blobs.git/blobdiff - src/ui/ui.cpp
balancing
[blobs.git] / src / ui / ui.cpp
index bbe7dbdb15db5ae6572324b73ac1de31dbd3068b..746be3e5295e1fc71fb7e5bbc82217405936964c 100644 (file)
@@ -8,6 +8,7 @@
 #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"
@@ -222,7 +223,11 @@ void CreaturePanel::Hide() noexcept {
 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()));
@@ -545,7 +550,7 @@ void TimePanel::Draw(graphics::Viewport &viewport) noexcept {
        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");
        }