mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Demo tweaks + general removal of the word dummy were possible with no issues (kept the API call).
This commit is contained in:
@ -5205,9 +5205,9 @@ void ImGui::ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags fl
|
||||
if (Selectable("##selectable", false, 0, picker_size)) // By default, Selectable() is closing popup
|
||||
g.ColorEditOptions = (g.ColorEditOptions & ~ImGuiColorEditFlags__PickerMask) | (picker_flags & ImGuiColorEditFlags__PickerMask);
|
||||
SetCursorScreenPos(backup_pos);
|
||||
ImVec4 dummy_ref_col;
|
||||
memcpy(&dummy_ref_col, ref_col, sizeof(float) * ((picker_flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4));
|
||||
ColorPicker4("##dummypicker", &dummy_ref_col.x, picker_flags);
|
||||
ImVec4 previewing_ref_col;
|
||||
memcpy(&previewing_ref_col, ref_col, sizeof(float) * ((picker_flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4));
|
||||
ColorPicker4("##previewing_picker", &previewing_ref_col.x, picker_flags);
|
||||
PopID();
|
||||
}
|
||||
PopItemWidth();
|
||||
@ -5679,7 +5679,7 @@ bool ImGui::CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags
|
||||
// - Selectable()
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// Tip: pass a non-visible label (e.g. "##dummy") then you can use the space to draw other text or image.
|
||||
// Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image.
|
||||
// But you need to make sure the ID is unique, e.g. enclose calls in PushID/PopID or use ##unique_id.
|
||||
// With this scheme, ImGuiSelectableFlags_SpanAllColumns and ImGuiSelectableFlags_AllowItemOverlap are also frequently used flags.
|
||||
// FIXME: Selectable() with (size.x == 0.0f) and (SelectableTextAlign.x > 0.0f) followed by SameLine() is currently not supported.
|
||||
@ -7121,7 +7121,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
const ImGuiStyle& style = g.Style;
|
||||
const ImGuiID id = TabBarCalcTabID(tab_bar, label);
|
||||
|
||||
// If the user called us with *p_open == false, we early out and don't render. We make a dummy call to ItemAdd() so that attempts to use a contextual popup menu with an implicit ID won't use an older ID.
|
||||
// If the user called us with *p_open == false, we early out and don't render.
|
||||
// We make a call to ItemAdd() so that attempts to use a contextual popup menu with an implicit ID won't use an older ID.
|
||||
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
|
||||
if (p_open && !*p_open)
|
||||
{
|
||||
|
Reference in New Issue
Block a user