1
0
mirror of synced 2024-11-12 02:00:52 +01:00

Properly right align FPS display

This commit is contained in:
WerWolv 2020-11-11 11:56:37 +01:00
parent 3dfff3c754
commit c6ef30e764

View File

@ -71,8 +71,11 @@ namespace hex {
} }
if (this->m_fpsVisible) { if (this->m_fpsVisible) {
ImGui::SameLine(ImGui::GetWindowWidth() - 80); char buffer[0x20];
ImGui::Text("%.1f FPS", ImGui::GetIO().Framerate); snprintf(buffer, 0x20, "%.1f FPS", ImGui::GetIO().Framerate);
ImGui::SameLine(ImGui::GetWindowWidth() - ImGui::GetFontSize() * strlen(buffer) + 20);
ImGui::TextUnformatted(buffer);
} }