mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 04:28:47 +02:00
Added BeginPopupModal() with actual modal behaviour (WIP api) (#249)
This commit is contained in:
10
imgui.h
10
imgui.h
@ -171,9 +171,10 @@ namespace ImGui
|
||||
// Popup
|
||||
IMGUI_API void OpenPopup(const char* str_id); // mark popup as open. popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). close childs popups if any. will close popup when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block.
|
||||
IMGUI_API bool BeginPopup(const char* str_id); // return true if popup if opened and start outputting to it. only call EndPopup() if BeginPopup() returned true!
|
||||
IMGUI_API bool BeginPopupContextItem(const char* str_id, int mouse_button = 1); // open and begin popup when clicked on last item
|
||||
IMGUI_API bool BeginPopupContextWindow(bool also_over_items = true, const char* str_id = NULL, int mouse_button = 1); // open and begin popup when clicked on current window
|
||||
IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, int mouse_button = 1); // open and begin popup when clicked in void (no window)
|
||||
IMGUI_API bool BeginPopupModal(const char* name, ImGuiWindowFlags extra_flags = 0);
|
||||
IMGUI_API bool BeginPopupContextItem(const char* str_id, int mouse_button = 1); // helper to open and begin popup when clicked on last item
|
||||
IMGUI_API bool BeginPopupContextWindow(bool also_over_items = true, const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked on current window
|
||||
IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked in void (no window)
|
||||
IMGUI_API void EndPopup();
|
||||
IMGUI_API void CloseCurrentPopup(); // close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.
|
||||
|
||||
@ -428,7 +429,8 @@ enum ImGuiWindowFlags_
|
||||
ImGuiWindowFlags_ComboBox = 1 << 23, // Don't use! For internal use by ComboBox()
|
||||
ImGuiWindowFlags_Tooltip = 1 << 24, // Don't use! For internal use by BeginTooltip()
|
||||
ImGuiWindowFlags_Popup = 1 << 25, // Don't use! For internal use by BeginPopup()
|
||||
ImGuiWindowFlags_ChildMenu = 1 << 26 // Don't use! For internal use by BeginMenu()
|
||||
ImGuiWindowFlags_Modal = 1 << 26, // Don't use! For internal use by BeginPopupModal()
|
||||
ImGuiWindowFlags_ChildMenu = 1 << 27 // Don't use! For internal use by BeginMenu()
|
||||
};
|
||||
|
||||
// Flags for ImGui::InputText()
|
||||
|
Reference in New Issue
Block a user