pkdawson / imgui-godot

Dear ImGui plugin for Godot 4
MIT License
424 stars 24 forks source link

Support ImGui viewports (multiple windows) #14

Closed pkdawson closed 1 year ago

pkdawson commented 1 year 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 1 year 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 1 year 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.