1
0
mirror of synced 2024-11-24 15:50:16 +01:00

ui: Make footer items jump around less

This commit is contained in:
WerWolv 2021-09-21 03:10:09 +02:00
parent 26a0352851
commit 6ab0ec547c
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,7 @@ namespace hex::plugin::builtin {
framerate = 1.0F / ImGui::GetIO().DeltaTime;
}
ImGui::TextUnformatted(hex::format("FPS {0:.2f}", framerate).c_str());
ImGui::TextUnformatted(hex::format("FPS {0:2}.{1:02}", u32(framerate), u32(framerate * 100) % 100).c_str());
});
}

View File

@ -67,9 +67,11 @@ namespace hex::plugin::windows {
lastUserCPU = user;
lastSysCPU = sys;
}
cpuUsage *= 100;
}
ImGui::TextUnformatted(hex::format(ICON_FA_TACHOMETER_ALT " {0:.2f}%", cpuUsage * 100).c_str());
ImGui::TextUnformatted(hex::format(ICON_FA_TACHOMETER_ALT " {0:2}.{1:02}", u32(cpuUsage), u32(cpuUsage * 100) % 100).c_str());
});
ContentRegistry::Interface::addFooterItem([] {