Right-justify warning/error/fatal messages in the launcher text box

This commit is contained in:
Alexander Bock
2023-11-28 16:49:50 +01:00
parent 7b081bd8cf
commit 56ad7a3365

View File

@@ -523,10 +523,11 @@ void LoadingScreen::renderLogMessages() const {
size_t row = 0;
for (auto& [level, amount] : numberOfErrorsPerLevel) {
const std::string text = fmt::format("{}: {}", ghoul::to_string(level), amount);
glm::vec2 bbox = _logFont->boundingBox(text);
renderer.render(
*_logFont,
glm::vec2(
res.x - 0.07 * res.x,
res.x - bbox.x - 10,
10 + _logFont->pointSize() * row * 2
),
text,