This commit is contained in:
CortexCore
2023-11-02 20:58:36 +08:00
parent 3beceb1645
commit 7712c80804
75 changed files with 552 additions and 417 deletions

View 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}";
}
}