ui: Moved FPS counter to footer

This commit is contained in:
WerWolv
2021-06-07 18:13:54 +02:00
parent 7007fb53e7
commit e0112472d6
6 changed files with 39 additions and 17 deletions

View File

@@ -0,0 +1,21 @@
#include <hex/plugin.hpp>
#include <windows.h>
#include <psapi.h>
namespace hex::plugin::builtin {
void addFooterItems() {
ContentRegistry::Interface::addFooterItem([] {
static float framerate = 0;
if (ImGui::HasSecondPassed()) {
framerate = ImGui::GetIO().Framerate;
}
ImGui::TextUnformatted(hex::format("FPS {0:.2f}", framerate).c_str());
});
}
}