pkdawson / imgui-godot

Dear ImGui plugin for Godot 4
MIT License
494 stars 28 forks source link

Support ImGui viewports (multiple windows) #14

Closed pkdawson closed 1 year ago

pkdawson commented 2 years ago

https://github.com/ocornut/imgui/wiki/Multi-Viewports

https://docs.godotengine.org/en/latest/classes/class_window.html

The remaining work required seems to be converting between local (window) coordinates and global (screen) coordinates in the right places. Mouse input and rendering.

arran-nz commented 2 years ago

Here's a fun example:

GDScript, but may prove useful as Impl reference.

https://www.reddit.com/r/godot/comments/xr8yxn/learning_a_godot_40_window_node/ https://github.com/gongpha/godot4-window-test

pkdawson commented 2 years ago

I've finally got this working. It needs refactoring, bug fixing, and one small fix upstream (https://github.com/godotengine/godot/pull/69390), but I think the big problems are basically solved.

Will probably release as an experimental (not bug-free) feature in a week or so.