summaryrefslogtreecommitdiff
path: root/ui/editNetwork.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-27 21:47:41 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-27 21:47:41 +0000
commite0ac130808d9bed5443115ee91e9cccda713ae3c (patch)
treedad2b2cbe2bc8bf5560f4859880549472f808671 /ui/editNetwork.cpp
parentRemove the static texture cache (diff)
parentRender text in N draw calls (diff)
downloadilt-e0ac130808d9bed5443115ee91e9cccda713ae3c.tar.bz2
ilt-e0ac130808d9bed5443115ee91e9cccda713ae3c.tar.xz
ilt-e0ac130808d9bed5443115ee91e9cccda713ae3c.zip
Merge branch 'text2'
Diffstat (limited to 'ui/editNetwork.cpp')
-rw-r--r--ui/editNetwork.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/editNetwork.cpp b/ui/editNetwork.cpp
index 7fbde32..ac2d93d 100644
--- a/ui/editNetwork.cpp
+++ b/ui/editNetwork.cpp
@@ -8,6 +8,7 @@
#include <gfx/gl/sceneShader.h>
#include <gfx/models/texture.h>
+const std::filesystem::path fontpath {"/usr/share/fonts/hack/Hack-Regular.ttf"};
constexpr const glm::u8vec4 TRANSPARENT_BLUE {30, 50, 255, 200};
EditNetwork::EditNetwork(Network * n) :
@@ -17,7 +18,7 @@ EditNetwork::EditNetwork(Network * n) :
{"ui/icon/network.png", mode.toggle<BuilderJoin>()},
{"ui/icon/network.png", mode.toggle<BuilderFreeExtend>()},
},
- blue {1, 1, &TRANSPARENT_BLUE}
+ blue {1, 1, &TRANSPARENT_BLUE}, font {fontpath, 15}
{
}
@@ -66,7 +67,7 @@ void
EditNetwork::render(const UIShader & shader, const UIComponent::Position & parentPos) const
{
if (builder) {
- Text {builder->hint(), {{50, 10}, {0, 15}}, {1, 1, 0}}.render(shader, parentPos);
+ Text {builder->hint(), font, {{50, 10}, {0, 15}}, {1, 1, 0}}.render(shader, parentPos);
}
builderToolbar.render(shader, parentPos);
}