Added FPS display

This commit is contained in:
WerWolv
2020-11-11 09:22:55 +01:00
parent 434bb3494a
commit 6f59955c92
6 changed files with 17 additions and 5 deletions

View File

@@ -64,6 +64,18 @@ namespace hex {
for (auto &view : this->m_views)
view->createMenu();
if (ImGui::BeginMenu("View")) {
ImGui::MenuItem("Display FPS", "", &this->m_fpsVisible);
ImGui::EndMenu();
}
if (this->m_fpsVisible) {
ImGui::SameLine(ImGui::GetWindowWidth() - 80);
ImGui::Text("%.1f FPS", ImGui::GetIO().Framerate);
}
ImGui::EndMenuBar();
ImGui::End();