You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine I want to add a context menu on node content. In the sample.cpp:
// Custom node content may go hereImGui::Text("Content of %s", node->Title);
constchar* names[5] = { "Label1", "Label2", "Label3", "Label4", "Label5" };
for (int n = 0; n < 5; n++)
{
ImGui::Selectable(names[n]);
if (ImGui::BeginPopupContextItem()) // <-- use last item id as popup id
{
ImGui::Text("This a popup for \"%s\"!", names[n]);
if (ImGui::Button("Close"))
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Right-click to open popup");
}
This is just pasted from imgui_demo.cpp
This doesn't work. Only the context menu for adding nodes is opened.
The text was updated successfully, but these errors were encountered:
Imagine I want to add a context menu on node content. In the sample.cpp:
This is just pasted from imgui_demo.cpp
This doesn't work. Only the context menu for adding nodes is opened.
The text was updated successfully, but these errors were encountered: