diff --git a/private/sdl_gpu_test/6_ui/app.cpp b/private/sdl_gpu_test/6_ui/app.cpp index e87751b..f27e7d7 100644 --- a/private/sdl_gpu_test/6_ui/app.cpp +++ b/private/sdl_gpu_test/6_ui/app.cpp @@ -95,7 +95,7 @@ void UIApp::update(const AppUpdateArgs& args) Application::update(args); processInput(args); - mLabel->setText(std::format("Rotation: {}{}\n$rUI vertices: $f00{}", mRotation > 180.f ? "$00f": "$fff" , mRotation, mNumVertices)); + mLabel->setText(std::format("Rotation: {}{}\n$rUI vertices: $f8c{}", mRotation > 180.f ? "$8cf": "$fff" , mRotation, mUIRenderer.getNumVertices())); mWidgetTree.revalidateWidgets(); // begin rendering diff --git a/private/sdl_gpu_test/gui/ui_renderer.hpp b/private/sdl_gpu_test/gui/ui_renderer.hpp index 4927cc7..1be0512 100644 --- a/private/sdl_gpu_test/gui/ui_renderer.hpp +++ b/private/sdl_gpu_test/gui/ui_renderer.hpp @@ -82,6 +82,9 @@ private: bool mVerticesDirty = true; std::size_t mVertexBufferSize = 0; public: + [[nodiscard]] + std::size_t getNumVertices() const noexcept { return mVertices.size(); } + void init(Application& application); void render(const UIRendererRenderArgs& args);