Updated ImGui.
This commit is contained in:
parent
7f058c4071
commit
4091403934
2
3rdparty/dear-imgui/imgui.cpp
vendored
2
3rdparty/dear-imgui/imgui.cpp
vendored
@ -9732,7 +9732,7 @@ static void ImeSetInputScreenPosFn_DefaultImpl(int, int) {}
|
||||
|
||||
void ImGui::ShowMetricsWindow(bool* p_open)
|
||||
{
|
||||
if (!ImGui::Begin("ImGui Metrics", p_open))
|
||||
if (!ImGui::Begin("Dear ImGui Metrics", p_open))
|
||||
{
|
||||
ImGui::End();
|
||||
return;
|
||||
|
4
3rdparty/dear-imgui/imgui.h
vendored
4
3rdparty/dear-imgui/imgui.h
vendored
@ -824,9 +824,9 @@ enum ImGuiTabBarFlags_
|
||||
ImGuiTabBarFlags_None = 0,
|
||||
ImGuiTabBarFlags_Reorderable = 1 << 0, // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
|
||||
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1, // Automatically select new tabs when they appear
|
||||
ImGuiTabBarFlags_TabListPopupButton = 1 << 2,
|
||||
ImGuiTabBarFlags_TabListPopupButton = 1 << 2, // Disable buttons to open the tab list popup
|
||||
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
|
||||
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
|
||||
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
|
||||
ImGuiTabBarFlags_NoTooltip = 1 << 5, // Disable tooltips when hovering a tab
|
||||
ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6, // Resize tabs when they don't fit
|
||||
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7, // Add scroll buttons when tabs don't fit
|
||||
|
8
3rdparty/dear-imgui/imgui_demo.cpp
vendored
8
3rdparty/dear-imgui/imgui_demo.cpp
vendored
@ -246,7 +246,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
ImGui::SetNextWindowSize(ImVec2(550, 680), ImGuiCond_FirstUseEver);
|
||||
|
||||
// Main body of the Demo window starts here.
|
||||
if (!ImGui::Begin("ImGui Demo", p_open, window_flags))
|
||||
if (!ImGui::Begin("Dear ImGui Demo", p_open, window_flags))
|
||||
{
|
||||
// Early out if the window is collapsed, as an optimization.
|
||||
ImGui::End();
|
||||
@ -1235,8 +1235,8 @@ static void ShowDemoWindowWidgets()
|
||||
ImGui::Text("HSV encoded colors");
|
||||
ImGui::SameLine(); HelpMarker("By default, colors are given to ColorEdit and ColorPicker in RGB, but ImGuiColorEditFlags_InputHSV allows you to store colors as HSV and pass them to ColorEdit and ColorPicker as HSV. This comes with the added benefit that you can manipulate hue values with the picker even when saturation or value are zero.");
|
||||
ImGui::Text("Color widget with InputHSV:");
|
||||
ImGui::ColorEdit4("HSV shown as HSV##1", (float*)&color_stored_as_hsv, ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputHSV | ImGuiColorEditFlags_Float);
|
||||
ImGui::ColorEdit4("HSV shown as RGB##1", (float*)&color_stored_as_hsv, ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_InputHSV | ImGuiColorEditFlags_Float);
|
||||
ImGui::ColorEdit4("HSV shown as RGB##1", (float*)&color_stored_as_hsv, ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputHSV | ImGuiColorEditFlags_Float);
|
||||
ImGui::ColorEdit4("HSV shown as HSV##1", (float*)&color_stored_as_hsv, ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_InputHSV | ImGuiColorEditFlags_Float);
|
||||
ImGui::DragFloat4("Raw HSV values", (float*)&color_stored_as_hsv, 0.01f, 0.0f, 1.0f);
|
||||
|
||||
ImGui::TreePop();
|
||||
@ -2572,7 +2572,7 @@ static void ShowDemoWindowColumns()
|
||||
ImGui::NextColumn();
|
||||
if (open1)
|
||||
{
|
||||
for (int y = 0; y < 5; y++)
|
||||
for (int y = 0; y < 3; y++)
|
||||
{
|
||||
bool open2 = ImGui::TreeNode((void*)(intptr_t)y, "Node%d.%d", x, y);
|
||||
ImGui::NextColumn();
|
||||
|
13
3rdparty/dear-imgui/imgui_internal.h
vendored
13
3rdparty/dear-imgui/imgui_internal.h
vendored
@ -350,14 +350,15 @@ enum ImGuiColumnsFlags_
|
||||
ImGuiColumnsFlags_GrowParentContentsSize= 1 << 4 // (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.
|
||||
};
|
||||
|
||||
// Extend ImGuiSelectableFlags_
|
||||
enum ImGuiSelectableFlagsPrivate_
|
||||
{
|
||||
// NB: need to be in sync with last value of ImGuiSelectableFlags_
|
||||
ImGuiSelectableFlags_NoHoldingActiveID = 1 << 10,
|
||||
ImGuiSelectableFlags_PressedOnClick = 1 << 11,
|
||||
ImGuiSelectableFlags_PressedOnRelease = 1 << 12,
|
||||
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 13, // FIXME: We may be able to remove this (added in 6251d379 for menus)
|
||||
ImGuiSelectableFlags_AllowItemOverlap = 1 << 14
|
||||
ImGuiSelectableFlags_NoHoldingActiveID = 1 << 20,
|
||||
ImGuiSelectableFlags_PressedOnClick = 1 << 21,
|
||||
ImGuiSelectableFlags_PressedOnRelease = 1 << 22,
|
||||
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 23, // FIXME: We may be able to remove this (added in 6251d379 for menus)
|
||||
ImGuiSelectableFlags_AllowItemOverlap = 1 << 24
|
||||
};
|
||||
|
||||
enum ImGuiSeparatorFlags_
|
||||
@ -1350,6 +1351,7 @@ struct ImGuiItemHoveredDataBackup
|
||||
// Tab bar, tab item
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Extend ImGuiTabBarFlags_
|
||||
enum ImGuiTabBarFlagsPrivate_
|
||||
{
|
||||
ImGuiTabBarFlags_DockNode = 1 << 20, // Part of a dock node [we don't use this in the master branch but it facilitate branch syncing to keep this around]
|
||||
@ -1357,6 +1359,7 @@ enum ImGuiTabBarFlagsPrivate_
|
||||
ImGuiTabBarFlags_SaveSettings = 1 << 22 // FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty when reordering tabs
|
||||
};
|
||||
|
||||
// Extend ImGuiTabItemFlags_
|
||||
enum ImGuiTabItemFlagsPrivate_
|
||||
{
|
||||
ImGuiTabItemFlags_NoCloseButton = 1 << 20 // Store whether p_open is set or not, which we need to recompute WidthContents during layout.
|
||||
|
2
3rdparty/dear-imgui/imgui_widgets.cpp
vendored
2
3rdparty/dear-imgui/imgui_widgets.cpp
vendored
@ -4273,7 +4273,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag
|
||||
Spacing();
|
||||
}
|
||||
ImGuiColorEditFlags picker_flags_to_forward = ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__PickerMask | ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaBar;
|
||||
ImGuiColorEditFlags picker_flags = (flags_untouched & picker_flags_to_forward) | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_AlphaPreviewHalf;
|
||||
ImGuiColorEditFlags picker_flags = (flags_untouched & picker_flags_to_forward) | ImGuiColorEditFlags__DisplayMask | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_AlphaPreviewHalf;
|
||||
SetNextItemWidth(square_sz * 12.0f); // Use 256 + bar sizes?
|
||||
value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x);
|
||||
EndPopup();
|
||||
|
Loading…
Reference in New Issue
Block a user