Переглянути джерело

WIP Menus: Reverted f26de4635066950da80a174f276b668d4cb336a2 for now (#126)

ocornut 10 роки тому
батько
коміт
7d28fe5915
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      imgui.cpp

+ 4 - 4
imgui.cpp

@@ -357,7 +357,8 @@
  - combo/listbox: keyboard control. need inputtext like non-active focus + key handling. considering keybord for custom listbox (see github pr #203)
  - combo/listbox: keyboard control. need inputtext like non-active focus + key handling. considering keybord for custom listbox (see github pr #203)
  - listbox: multiple selection
  - listbox: multiple selection
  - listbox: user may want to initial scroll to focus on the one selected value?
  - listbox: user may want to initial scroll to focus on the one selected value?
- ! menubar, menus (github issue #126)
+ - menus: local shortcuts, global shortcuts
+ - menus: icons
  - tabs
  - tabs
  - gauge: various forms of gauge/loading bars widgets
  - gauge: various forms of gauge/loading bars widgets
  - color: better color editor.
  - color: better color editor.
@@ -4926,8 +4927,8 @@ static bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), Im
     RenderTextClipped(bb.Min, bb.Max, label, NULL, &label_size, NULL, ImGuiAlign_Center | ImGuiAlign_VCenter);
     RenderTextClipped(bb.Min, bb.Max, label, NULL, &label_size, NULL, ImGuiAlign_Center | ImGuiAlign_VCenter);
 
 
     // Automatically close popups
     // Automatically close popups
-    if (pressed && !(flags & ImGuiButtonFlags_DontClosePopups) && (window->Flags & ImGuiWindowFlags_Popup))
-        ImGui::CloseCurrentPopup();
+    //if (pressed && !(flags & ImGuiButtonFlags_DontClosePopups) && (window->Flags & ImGuiWindowFlags_Popup))
+    //    ImGui::CloseCurrentPopup();
 
 
     return pressed;
     return pressed;
 }
 }
@@ -11464,7 +11465,6 @@ static void ShowExampleMenuFile()
         static float f = 0.5f;
         static float f = 0.5f;
         ImGui::SliderFloat("Value", &f, 0.0f, 1.0f);
         ImGui::SliderFloat("Value", &f, 0.0f, 1.0f);
         ImGui::InputFloat("Input", &f, 0.1f);
         ImGui::InputFloat("Input", &f, 0.1f);
-        ImGui::Button("Button");
         ImGui::EndMenu();
         ImGui::EndMenu();
     }
     }
     if (ImGui::BeginMenu("Colors"))
     if (ImGui::BeginMenu("Colors"))