1
This commit is contained in:
18
BITKit/Scripts/UX/UXProfiler.cs
Normal file
18
BITKit/Scripts/UX/UXProfiler.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
namespace BITKit.UX;
|
||||
public partial class UXProfiler : Node
|
||||
{
|
||||
[Export] private Label fpsLabel;
|
||||
[Export] private Label resolutionLabel;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
var windowSize = DisplayServer.WindowGetSize();
|
||||
if (fpsLabel is not null)
|
||||
fpsLabel.Text = $"FPS: {Engine.GetFramesPerSecond()}";
|
||||
if (resolutionLabel is not null)
|
||||
resolutionLabel.Text = $"Resolution: {windowSize.X}x{windowSize.Y}";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user