| 1715 | } |
| 1716 | |
| 1717 | void UI::UpdateFrameStats(double frameDeltaTime) { |
| 1718 | constexpr float updateInterval = 0.5f; // Update every 500ms |
| 1719 | ++frameCount; |
| 1720 | deltaTime += frameDeltaTime; |
| 1721 | if (deltaTime >= updateInterval) { |
| 1722 | fps = static_cast<double>(frameCount) / deltaTime; |
| 1723 | deltaTime = 0; |
| 1724 | frameCount = 0; |
| 1725 | } |
| 1726 | } |
| 1727 | |
| 1728 | void UI::SetupStyle() { |
| 1729 | ImGuiStyle& style = ImGui::GetStyle(); |