diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-27 20:50:29 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-10-27 20:50:29 -0400 |
commit | 816bedbd011b6729e8be0a4b40213f48fd9d73ca (patch) | |
tree | b42d7dc277c415db4b826182ecd26b10b714697e /src/components.cpp | |
parent | 0fa2320e978926db6781a2bdcdf5a9b6f0317e93 (diff) |
names, jumping
Diffstat (limited to 'src/components.cpp')
-rw-r--r-- | src/components.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components.cpp b/src/components.cpp index 45a9315..e00d474 100644 --- a/src/components.cpp +++ b/src/components.cpp @@ -4,6 +4,7 @@ #include <events.hpp> #include <render.hpp> +#include <ui.hpp> #include <engine.hpp> void MovementSystem::update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) @@ -88,6 +89,12 @@ void RenderSystem::update(entityx::EntityManager &en, entityx::EventManager &ev, Render::worldShader.disable(); Render::worldShader.unuse(); + + en.each<Visible, Position, Solid, Name>([](entityx::Entity e, Visible &v, Position &pos, Solid& dim, Name &name) { + (void)e; + (void)v; + ui::putStringCentered(pos.x + dim.width / 2, pos.y - ui::fontSize - HLINES(0.5), name.name); + }); } /* |