mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 09:30:56 +01:00
Navigation: minor sync to reduce drifts between changes
This commit is contained in:
parent
fa9327ccf8
commit
90d0b8b58b
@ -4794,8 +4794,9 @@ bool ImGui::BeginPopupContextItem(const char* str_id, int mouse_button)
|
||||
ImGuiWindow* window = GImGui->CurrentWindow;
|
||||
ImGuiID id = str_id ? window->GetID(str_id) : window->DC.LastItemId; // If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
|
||||
IM_ASSERT(id != 0); // However, you cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
|
||||
if (IsMouseClicked(mouse_button) && IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
|
||||
OpenPopupEx(id, true);
|
||||
if (IsMouseClicked(mouse_button))
|
||||
if (IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
|
||||
OpenPopupEx(id, true);
|
||||
return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize);
|
||||
}
|
||||
|
||||
@ -11525,9 +11526,10 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
||||
value_changed = value_changed_h = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Alpha bar logic
|
||||
if (alpha_bar)
|
||||
{
|
||||
// Alpha bar logic
|
||||
SetCursorScreenPos(ImVec2(bar1_pos_x, picker_pos.y));
|
||||
InvisibleButton("alpha", ImVec2(bars_width, sv_picker_size));
|
||||
if (IsItemActive())
|
||||
|
@ -182,7 +182,7 @@ enum ImGuiButtonFlags_
|
||||
ImGuiButtonFlags_PressedOnRelease = 1 << 3, // return true on release (default requires click+release)
|
||||
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 4, // return true on double-click (default requires click+release)
|
||||
ImGuiButtonFlags_FlattenChildren = 1 << 5, // allow interactions even if a child window is overlapping
|
||||
ImGuiButtonFlags_AllowItemOverlap = 1 << 6, // require previous frame HoveredId to either match id or be null before being usable
|
||||
ImGuiButtonFlags_AllowItemOverlap = 1 << 6, // require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap()
|
||||
ImGuiButtonFlags_DontClosePopups = 1 << 7, // disable automatically closing parent popup on press // [UNUSED]
|
||||
ImGuiButtonFlags_Disabled = 1 << 8, // disable interactions
|
||||
ImGuiButtonFlags_AlignTextBaseLine = 1 << 9, // vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
|
||||
|
Loading…
Reference in New Issue
Block a user