Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup over Grid/Node? #185

Open
xahon opened this issue May 27, 2023 · 1 comment
Open

Popup over Grid/Node? #185

xahon opened this issue May 27, 2023 · 1 comment

Comments

@xahon
Copy link

xahon commented May 27, 2023

Popup doesn't show up with example imgui code

ImNodes::BeginNodeEditor(); // Or ImNodes::BeginNode(hardcoded_node_id);
// Below ImGui's demo code
if (ImGui::BeginPopupContextItem()) // <-- use last item id as popup id
{
    selected = n;
    ImGui::Text("This a popup for \"%s\"!", names[n]);
    if (ImGui::Button("Close"))
        ImGui::CloseCurrentPopup();
    ImGui::EndPopup();
}

I'm trying to bring in a context menu for convenient nodes creation

@kieroooo
Copy link

I think i had the same issue and solved it by moving the popup handling outside of the NodeEditor's Begin/End block. In node editor i only remember which node the popup would be related to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants