aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-10-21 10:08:41 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-10-21 10:08:41 -0400
commit8a5ebb5b1c80e7ac857614cee7e7dbd9ab565429 (patch)
tree08b067f5b5cfada35d6a0eaa60bafe932f5f2c76 /include
parentdff621732099934ba5aba09c6b5c3df87b9858b5 (diff)
z standardization
Diffstat (limited to 'include')
-rw-r--r--include/inventory.hpp1
-rw-r--r--include/render.hpp16
-rw-r--r--include/ui_quest.hpp10
3 files changed, 22 insertions, 5 deletions
diff --git a/include/inventory.hpp b/include/inventory.hpp
index 273241a..753d90f 100644
--- a/include/inventory.hpp
+++ b/include/inventory.hpp
@@ -76,7 +76,6 @@ private:
constexpr static const char* itemsPath = "config/items.xml";
constexpr static int entrySize = 70;
constexpr static int hotbarSize = 4;
- constexpr static float inventoryZ = -5.0f;
constexpr static unsigned int rowSize = 8;
static std::unordered_map<std::string, Item> itemList;
diff --git a/include/render.hpp b/include/render.hpp
index a21fcdd..e081b9d 100644
--- a/include/render.hpp
+++ b/include/render.hpp
@@ -66,6 +66,22 @@ typedef enum {
} WorldUniform;
namespace Render {
+ namespace ZRange {
+ constexpr float World = 9.9f;
+ constexpr float RenderSys = 5.0f;
+ constexpr float Ground = -4.5f;
+ constexpr float Attack = -5.0f;
+ constexpr float Particle = -8.0f;
+ constexpr float Important = -8.5f;
+ constexpr float Inventory = -9.0f;
+ constexpr float Dialog = -9.3f;
+ constexpr float Quest = -9.5f;
+ constexpr float Fade = -9.7f;
+ constexpr float Menu = -9.8f;
+ constexpr float Mouse = -9.89f;
+ constexpr float Debug = -9.9f;
+ }
+
extern Shader worldShader;
extern Shader textShader;
diff --git a/include/ui_quest.hpp b/include/ui_quest.hpp
index e06570a..1c478ca 100644
--- a/include/ui_quest.hpp
+++ b/include/ui_quest.hpp
@@ -30,12 +30,13 @@ namespace ui {
void draw(void) {
if (!_toggle)
return;
-
+
+ float z = Render::ZRange::Quest;
float top_y = offset.y + 200;
- ui::drawNiceBox(vec2 {offset.x - 200, top_y },
- vec2 {offset.x + 200, offset.y - 200 },
- -0.7f);
+ ui::drawNiceBox(vec2 {offset.x - 200, top_y }, vec2 {offset.x + 200, offset.y - 200 },
+ z);
+ FontSystem::setFontZ(z - 0.01f);
UISystem::putStringCentered(vec2(offset.x, top_y - 40), "Current Quests:");
const auto& titles = QuestSystem::getQuestTitles();
@@ -47,6 +48,7 @@ namespace ui {
//ui::putText(x + 40, y, q.desc.c_str());
//y -= 40;
}
+ FontSystem::setFontZ();
}
}
}