Improved UI

This commit is contained in:
2024-02-24 16:42:26 +01:00
parent d1b46fb9e0
commit dc252ab5d3
3 changed files with 170 additions and 121 deletions

View File

@ -6,4 +6,12 @@ extends DebugLabel
@export var suffix := ""
func _process(_delta):
text = str(snapped(Performance.get_monitor(monitor) * multiply, precision)) + suffix
match monitor:
Performance.Monitor.TIME_PROCESS, Performance.Monitor.TIME_PHYSICS_PROCESS:
text = str(snapped(Performance.get_monitor(monitor) * 1000, 0.1)) + " ms"
Performance.Monitor.RENDER_TOTAL_PRIMITIVES_IN_FRAME:
text = str(round(Performance.get_monitor(monitor) / 1000)) + "k"
Performance.Monitor.RENDER_VIDEO_MEM_USED:
text = str(round(Performance.get_monitor(monitor) / 1000000)) + " MB"
_:
text = str(Performance.get_monitor(monitor))