From 63a39dd08e2a3e34760e7a7115be7a41185cc008 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 26 May 2015 16:14:51 +0100 Subject: [PATCH] WIP Menus: Recursive menu demo (#126). Actually useful to test sub-menu positioning. --- imgui.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 782d10f8..727776e4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11358,6 +11358,11 @@ static void ShowExampleMenuFile() { ImGui::MenuItem("Hello"); ImGui::MenuItem("Sailor"); + if (ImGui::BeginMenu("Recurse..")) + { + ShowExampleMenuFile(); + ImGui::EndMenu(); + } ImGui::EndMenu(); } ImGui::EndMenu();