mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Display 2 decimals instead of 1 in editor frametime labels
When comparing different graphics settings or optimizations, this makes precise measurements and frametime comparisons easier. This also makes the editor FPS display use `pad_decimals()` for consistency with the implementation in `master`.
This commit is contained in:
parent
b0cd38b7e3
commit
b31f6f78a3
2 changed files with 3 additions and 3 deletions
|
|
@ -2618,7 +2618,7 @@ void SpatialEditorViewport::_notification(int p_what) {
|
|||
if (show_fps) {
|
||||
String text;
|
||||
const float temp_fps = Engine::get_singleton()->get_frames_per_second();
|
||||
text += vformat(TTR("FPS: %d (%s ms)"), temp_fps, String::num(1000.0f / temp_fps, 2));
|
||||
text += vformat(TTR("FPS: %d (%s ms)"), temp_fps, rtos(1000.0f / temp_fps).pad_decimals(2));
|
||||
fps_label->set_text(text);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue