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.