From e49c618687ca6c488fc405dea566e3ac0015f466 Mon Sep 17 00:00:00 2001 From: Patrick Dawson Date: Fri, 14 Oct 2022 17:16:29 +0200 Subject: [PATCH] beta 3 is out --- Dear ImGui for Godot Demo.csproj | 2 +- README.md | 5 ++++- addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs | 2 +- src/MySecondNode.cs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dear ImGui for Godot Demo.csproj b/Dear ImGui for Godot Demo.csproj index 248459c..e5b0a96 100644 --- a/Dear ImGui for Godot Demo.csproj +++ b/Dear ImGui for Godot Demo.csproj @@ -1,4 +1,4 @@ - + net6.0 true diff --git a/README.md b/README.md index b734df4..a8d717c 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,10 @@ cp .godot/mono/temp/bin/Debug/runtimes/osx-universal/native/libcimgui.dylib . In any Node's `_Process` method, use `ImGuiNET` to create your GUI. Just don't set the `ProcessPriority` in any of your Nodes to either `int.MinValue` or `int.MaxValue`. -You can also connect to the `ImGuiLayout` signal, and use ImGui in the method which handles that signal. +You can also connect to the `ImGuiLayout` signal, and use ImGui in the method which handles that signal: +```csharp +ImGuiLayer.Connect(OnImGuiLayout); +``` ### ImGuiLayer diff --git a/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs b/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs index 210f093..5bde23d 100644 --- a/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs +++ b/addons/imgui-godot/ImGuiGodot/ImGuiLayer.cs @@ -118,7 +118,7 @@ public static void Connect(ImGuiLayoutEventHandler d) // temporary workaround for a bug in the early Godot 4 betas Instance.Connect(SignalName.ImGuiLayout, new Callable(d.Target as Object, d.Method.Name)); - // TODO: use this after Godot 4.0-beta3 is released + // TODO: use this when it no longer breaks on changing scenes // Instance.ImGuiLayout += d; } } diff --git a/src/MySecondNode.cs b/src/MySecondNode.cs index 60b25c9..4f775fc 100644 --- a/src/MySecondNode.cs +++ b/src/MySecondNode.cs @@ -18,7 +18,7 @@ public override void _EnterTree() { // it's easier to configure fonts in the ImGuiLayer scene, // but here's how it can be done in code - + ImGuiGD.Init(); // use Hack for the default glyphs, M+2 for Japanese