mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
InvisibleButton: Made public a small selection of ImGuiButtonFlags (previously in imgui_internal.h) and allowed to pass them to InvisibleButton().
This commit is contained in:
@ -685,7 +685,7 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags
|
||||
|
||||
bool ImGui::Button(const char* label, const ImVec2& size_arg)
|
||||
{
|
||||
return ButtonEx(label, size_arg, 0);
|
||||
return ButtonEx(label, size_arg, ImGuiButtonFlags_None);
|
||||
}
|
||||
|
||||
// Small buttons fits within text without additional vertical spacing.
|
||||
@ -701,7 +701,7 @@ bool ImGui::SmallButton(const char* label)
|
||||
|
||||
// Tip: use ImGui::PushID()/PopID() to push indices or pointers in the ID stack.
|
||||
// Then you can keep 'str_id' empty or the same for all your buttons (instead of creating a string based on a non-string id)
|
||||
bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg)
|
||||
bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg, ImGuiButtonFlags flags)
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
@ -718,7 +718,7 @@ bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg)
|
||||
return false;
|
||||
|
||||
bool hovered, held;
|
||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held);
|
||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
|
||||
|
||||
return pressed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user