From a827e6edcd6b4d1e0f903e4a67e5a445292e7fcc Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Thu, 19 Sep 2024 17:23:12 +0200 Subject: [PATCH] Added text height parameter. --- private/sdl_gpu_test/6_ui/app.cpp | 3 +- private/sdl_gpu_test/gui/button.cpp | 24 +++++++++++-- private/sdl_gpu_test/gui/button.hpp | 32 ++++++++++------- private/sdl_gpu_test/gui/label.cpp | 18 ++++++++-- private/sdl_gpu_test/gui/label.hpp | 22 +++++++----- private/sdl_gpu_test/gui/ui_renderer.cpp | 46 ++++++++++++++---------- private/sdl_gpu_test/gui/ui_renderer.hpp | 23 ++++++------ 7 files changed, 114 insertions(+), 54 deletions(-) diff --git a/private/sdl_gpu_test/6_ui/app.cpp b/private/sdl_gpu_test/6_ui/app.cpp index 308eb13..e87751b 100644 --- a/private/sdl_gpu_test/6_ui/app.cpp +++ b/private/sdl_gpu_test/6_ui/app.cpp @@ -76,7 +76,8 @@ void UIApp::init(const AppInitArgs& args) .text = "Test-Text!\nSecond $f00line$fff?", .color = glm::vec4(0.f, 1.f, 0.f, 1.f), .posX = 100, - .posY = 100 + .posY = 100, + .textHeight = 20 }); mButton = mWidgetTree.getRootWidget().emplaceChild