Fixed the UI vertices count display.

This commit is contained in:
Patrick 2024-09-19 17:33:05 +02:00
parent a827e6edcd
commit 669bce546d
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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);