mirror of
https://github.com/pkdawson/imgui-godot.git
synced 2026-09-15 11:14:18 +00:00
22 lines
494 B
C#
22 lines
494 B
C#
using Godot;
|
|
using ImGuiNET;
|
|
|
|
namespace CSharpGameProject;
|
|
|
|
public partial class Main : Node
|
|
{
|
|
public override void _Ready()
|
|
{
|
|
if (DisplayServer.WindowGetVsyncMode() == DisplayServer.VSyncMode.Disabled)
|
|
{
|
|
int refreshRate = (int)DisplayServer.ScreenGetRefreshRate();
|
|
Engine.MaxFps = refreshRate > 0 ? refreshRate : 60;
|
|
}
|
|
|
|
#if IMGUI
|
|
var io = ImGui.GetIO();
|
|
io.ConfigFlags |= ImGuiConfigFlags.ViewportsEnable;
|
|
#endif
|
|
}
|
|
}
|