aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2017-04-27 21:33:13 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2017-04-27 21:33:13 -0400
commit2de1af94cfa794ae5dd7913c797d673b58289949 (patch)
tree3acb4e822943efb714ff04d4e88307127e34f52e /src/inventory.cpp
parent40f2ab396ccca1a12cc74d18c9758da5bc2f1afc (diff)
parent00de7a4b0aa48c3cb42c45e0f203902ca034b94c (diff)
Updated sprites
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 3e7104e..761ca43 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -4,6 +4,7 @@
#include <components.hpp>
#include <engine.hpp>
#include <error.hpp>
+#include <font.hpp>
#include <player.hpp>
#include <render.hpp>
#include <ui.hpp>
@@ -126,9 +127,9 @@ void InventorySystem::render(void)
if (n == movingItem)
glUniform4f(Render::textShader.uniform[WU_tex_color], .8, .8, 1, .8);
glDrawArrays(GL_TRIANGLES, 0, 6);
- ui::setFontZ(inventoryZ - 0.3); // TODO fix z's
- ui::putText(i.loc.x, i.loc.y, std::to_string(i.count).c_str());
- ui::setFontZ(-6);
+ FontSystem::setFontZ(inventoryZ - 0.3); // TODO fix z's
+ UISystem::putString(i.loc, std::to_string(i.count));
+ FontSystem::setFontZ(-6);
glUniform4f(Render::textShader.uniform[WU_tex_color], 1, 1, 1, 1);
}
}
@@ -211,7 +212,7 @@ void InventorySystem::receive(const MouseReleaseEvent &mre)
auto e = game::entities.create();
e.assign<Position>(mre.position.x, mre.position.y);
- e.assign<Direction>(0, 1);
+ e.assign<Direction>(0, 0.1f);
e.assign<ItemDrop>(items[movingItem]);
e.assign<Sprite>();
e.component<Sprite>()->addSpriteSegment(