Releases: pkdawson/imgui-godot
v3.5.1
Update for ImGui.NET 1.89.1
Please note the new function signature for ImageButton
, which now requires a string identifier.
v3.5.0
This release introduces experimental support for multi-viewports. Try it out if you want, but there are some important caveats.
EXPERIMENTAL: ImGui Viewports
To enable the feature, call ImGuiGD.ExperimentalEnableViewports()
For now, this is incompatible with Godot's embedded subwindows, so you should disable the project setting display/window/subwindows/embed_subwindows
Known Issues
Windows
- #23 Main window stops responding to input
To avoid this issue:
- Never resize an internal window past the bounds of the main window. Drag it out first.
- When dragging out a window, grab it from near the middle, not the edge.
- If you do trigger the bug and the main window becomes unresponsive, drag the new window back into the main window. That should fix it temporarily, but itβs best to restart your game/program as soon as possible, because it will still be in a buggy state.
This is an annoying bug which Iβm determined to fix, but Iβve already spent two days on it and Iβm unlikely to have time to focus on it again until mid-January. Until then, viewports should be usable if youβre a little careful when dragging windows out from the main window. Please report any other bugs.
macOS
- An extra click is required to focus a different window
Havenβt looked into this issue at all yet. Otherwise it seems usable.
v3.4.0
Requires Godot 4.0.beta6
New renderer finished
We're now able to make use of vertex offsets, which means the RendererHasVtxOffset
flag is enabled, and further optimization was possible. It's done and I'm quite happy with the result, though some minor changes will probably be necessary as I attempt to implement ImGui viewports.
v3.3.0
This release requires Godot 4.0 beta 5 (or later), because RenderingDevice is not usable in previous versions.
New renderer
We're now using the low-level RenderingDevice API, which is a thin wrapper over Vulkan (or in the future, Direct3D 12). In my crude stress test benchmarks, this gives something like a 5x increase in frame rate over the old canvas renderer. The result is pretty close to the official C++ backends.
The canvas renderer is still there as an option, mainly for debugging purposes. RendererHasVtxOffset is currently disabled, it will hopefully be implemented after beta 6.
Thanks to the Godot team for quickly merging my PRs, and to RenderDoc, a fantastic Vulkan debugger which saved me a ton of time.
v3.2.0
Some minor features and fixes, plus compatibility with Godot 4.0.beta4
imgui.ini
The default path is now user://imgui.ini
. This can be adjusted in the ImGuiLayer scene, or with io.SetIniFilename
. Setting it to an empty string or null
will disable it (sets io.IniFilename to NULL).
RendererHasVtxOffset
If you need to render large meshes in ImGui, that works now, but performance won't be great.
OBSOLETE: UnbindTexture
No need to call this anymore, since we can use the RID as a texture ID with some efficient reflection trickery.
v3.1.0
This release adds a couple related features to support high DPI displays and Godot's content scaling.
Content scaling
The scaling mode disabled
is supported, as well as the mode canvas_items
with aspect expand
. In these configurations, ImGui will be rendered independently at a consistent size.
Other modes and aspects are not supported. But I think those are the most useful root viewport configurations anyway, offering the highest quality and most controllable scaling, and you can probably achieve other results if necessary by using a SubViewport for game content.
DPI
imgui-godot will now try to automatically detect high DPI displays, and apply an integer scaling factor so it's rendered at the appropriate size. There's also configurable scaling which can be applied on top of this.
These settings can be adjusted in the ImGuiLayer
scene. If you want to change the scale at runtime, use ImGuiGD.Scale
. I'll see if I can improve this in the future, but for now settings in ImGuiLayer
only affect the startup configuration.
v3.0.0
This is a major release, which unfortunately means some breaking changes. The good news is that imgui-godot is now significantly easier to use, and more consistent with how Dear ImGui is meant to work.
Upgrading
Here's the short version:
-
Remove every
ImGuiNode
from your scenes. It's best to do this before anything else, so the editor doesn't complain about a missing script. -
Delete your old
addons/imgui-godot
folder first, then copy over the new one. -
Move all your ImGui code to a
_Process
method. Alternatively, you can use a signal fromImGuiLayer
- see the demo for details. -
Fix any compile errors. You will probably need to add a
using ImGuiGodot;
declaration. -
Verify that the plugin is enabled in Project Settings.
REMOVED: ImGuiNode
This was the wrong design, really just a proof of concept. It's much better if we can avoid fiddling with nodes and signals in the editor.
Instead, there's now...
NEW: ImGuiLayer
A global CanvasLayer, autoloaded by Godot whenever this plugin is enabled. It persists between scenes, and renders on top of everything else by default. Configure it by opening the scene res://addons/imgui-godot/ImGuiLayer.tscn
NEW: Create your layout in _Process
Instead of using signals, you can simply create your GUI in any Node's _Process
method.
But if you prefer, you can still use signals connected in code. As before, the signal will be emitted at the end of the processing step. To work around a bug, please use ImGuiLayer.Connect for connecting signals:
ImGuiLayer.Connect(OnImGuiLayout);
NEW: Mouse cursors
imgui-godot now fully supports all of ImGui's mouse cursor shapes, which mostly means that you can resize windows from their edges. We use the system's native hardware cursors provided through Godot.
NEW: International fonts
You can easily add (and optionally merge) multiple fonts by setting properties in the ImGuiLayer
scene. Each font's supported characters are automatically detected, no extra configuration required.
NEW: SubViewport
Widgets.SubViewport
will display a SubViewport and forward input events to it as long as your mouse cursor is hovering over it.
Thanks to @BrandonGillis for suggesting and helping with this feature.
And more!
Lots of small improvements and fixes.
Thanks to @arran-nz for #13 (Add Key and Joybutton extension to convert to ImGui types)
Roadmap
Future breaking changes are unlikely to be necessary, so I hope to avoid incrementing the major version again. There are still a few significant features I'd like to add to make this a really complete Dear ImGui backend; check the Issues page for details.
Feedback is always welcome. Let me know if something isn't working for your use case.