imgui-node-editor
imgui-node-editor copied to clipboard
Imgui 1.86 WIP with docking support
Hi, I found that imgui-node-editor does not support with imgui 1.86 docking.
Could you please fix the bug?
I will check it out
Same thing here, I'm using your branch 1.89 WIP (18808), I cannot dock the window :'(
Can you provide a repro?
So far I didn't manage to not make it work.
Ah! I have added your simple example to my global frame drawing:
void Blueprint::OnFrame()
{
auto& io = ImGui::GetIO();
ed::SetCurrentEditor(m_Editor);
ed::Begin("My Editor");
int uniqueId = 1;
// Start drawing nodes.
ed::BeginNode(uniqueId++);
ImGui::Text("Node A");
ed::BeginPin(uniqueId++, ed::PinKind::Input);
ImGui::Text("-> In");
ed::EndPin();
ImGui::SameLine();
ed::BeginPin(uniqueId++, ed::PinKind::Output);
ImGui::Text("Out ->");
ed::EndPin();
ed::EndNode();
ed::End();
ed::SetCurrentEditor(nullptr);
return;
}
All other windows are docked, when I drag this window I do not see any "blue anchor rectangle". Here the main loop (I'm using SDL2 as renderer):
int Update(SDL_Renderer *renderer, double deltaTime) override
{
draw_editor_layout();
draw_memory_editor();
m_blueprint.OnFrame(); // <<------- The Node editor is here
draw_ost_device(renderer, deltaTime);
code_editor_draw();
m_console.Draw("Console", nullptr);
return 0;
}
Hello do you need more information? I will try to push my project for you.
ed::Begin
does not create own window. Can you try to enclose code in OnFrame()
in ImGui::Begin()
/ImGui::End()
?
Yes it works, thank you it was obvious now.
1.86
The newest version of imgui is 1.89, and there's bug when integrating node-editor. It occurs when zooming and scrolling.
https://user-images.githubusercontent.com/48938612/208335911-f4ba9144-5408-4982-a0da-0c32b1ba00be.mp4
As a workaround please avoid running editor with zero size od when ImGui::GetContentRegionAvail()
is an empty rect. This will be fixed in the future.
Also, please in the future open new issue instead of hijacking older ones.