1
0
mirror of synced 2024-09-23 19:18:24 +02: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) {
ImGui::SameLine(ImGui::GetWindowWidth() - 80);
ImGui::Text("%.1f FPS", ImGui::GetIO().Framerate);
char buffer[0x20];
snprintf(buffer, 0x20, "%.1f FPS", ImGui::GetIO().Framerate);
ImGui::SameLine(ImGui::GetWindowWidth() - ImGui::GetFontSize() * strlen(buffer) + 20);
ImGui::TextUnformatted(buffer);
}