mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Merge branch 'master' into docking
+ 2 comments # Conflicts: # backends/imgui_impl_glfw.cpp # backends/imgui_impl_osx.mm # backends/imgui_impl_sdl2.cpp # backends/imgui_impl_sdl3.cpp # backends/imgui_impl_win32.cpp
This commit is contained in:
commit
f7fc186408
13 changed files with 438 additions and 107 deletions
17
imgui.cpp
17
imgui.cpp
|
|
@ -1211,6 +1211,7 @@ ImGuiStyle::ImGuiStyle()
|
|||
TabBorderSize = 0.0f; // Thickness of border around tabs.
|
||||
TabMinWidthForCloseButton = 0.0f; // Minimum width for close button to appear on an unselected tab when hovered. Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
|
||||
TabBarBorderSize = 1.0f; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
|
||||
TableAngledHeadersAngle = 35.0f * (IM_PI / 180.0f); // Angle of angled headers (supported values range from -50 degrees to +50 degrees).
|
||||
ColorButtonPosition = ImGuiDir_Right; // Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
|
||||
ButtonTextAlign = ImVec2(0.5f,0.5f);// Alignment of button text when button is larger than text.
|
||||
SelectableTextAlign = ImVec2(0.0f,0.0f);// Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
|
||||
|
|
@ -7690,7 +7691,6 @@ void ImGui::FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWind
|
|||
{
|
||||
// We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user.
|
||||
ImGuiWindow* window = g.WindowsFocusOrder[i];
|
||||
IM_ASSERT(window == window->RootWindow);
|
||||
if (window == ignore_window || !window->WasActive)
|
||||
continue;
|
||||
if (filter_viewport != NULL && window->Viewport != filter_viewport)
|
||||
|
|
@ -8589,11 +8589,13 @@ static const char* const GKeyNames[] =
|
|||
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H",
|
||||
"I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
|
||||
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12",
|
||||
"F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24",
|
||||
"Apostrophe", "Comma", "Minus", "Period", "Slash", "Semicolon", "Equal", "LeftBracket",
|
||||
"Backslash", "RightBracket", "GraveAccent", "CapsLock", "ScrollLock", "NumLock", "PrintScreen",
|
||||
"Pause", "Keypad0", "Keypad1", "Keypad2", "Keypad3", "Keypad4", "Keypad5", "Keypad6",
|
||||
"Keypad7", "Keypad8", "Keypad9", "KeypadDecimal", "KeypadDivide", "KeypadMultiply",
|
||||
"KeypadSubtract", "KeypadAdd", "KeypadEnter", "KeypadEqual",
|
||||
"AppBack", "AppForward",
|
||||
"GamepadStart", "GamepadBack",
|
||||
"GamepadFaceLeft", "GamepadFaceRight", "GamepadFaceUp", "GamepadFaceDown",
|
||||
"GamepadDpadLeft", "GamepadDpadRight", "GamepadDpadUp", "GamepadDpadDown",
|
||||
|
|
@ -11233,7 +11235,9 @@ bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags)
|
|||
}
|
||||
|
||||
// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup.
|
||||
// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup) so the actual value of *p_open is meaningless here.
|
||||
// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup).
|
||||
// - *p_open set back to false in BeginPopupModal() when popup is not open.
|
||||
// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup.
|
||||
bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
|
@ -11242,6 +11246,8 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags fla
|
|||
if (!IsPopupOpen(id, ImGuiPopupFlags_None))
|
||||
{
|
||||
g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
|
||||
if (p_open && *p_open)
|
||||
*p_open = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -15069,7 +15075,7 @@ void ImGui::DestroyPlatformWindows()
|
|||
// | - draw node background
|
||||
// | - DockNodeUpdateTabBar() - create/update tab bar for a docking node
|
||||
// | - DockNodeAddTabBar()
|
||||
// | - DockNodeUpdateWindowMenu()
|
||||
// | - DockNodeWindowMenuUpdate()
|
||||
// | - DockNodeCalcTabBarLayout()
|
||||
// | - BeginTabBarEx()
|
||||
// | - TabItemEx() calls
|
||||
|
|
@ -16691,6 +16697,7 @@ static int IMGUI_CDECL TabItemComparerByDockOrder(const void* lhs, const void* r
|
|||
// This is exceptionally stored in a function pointer to also user applications to tweak this menu (undocumented)
|
||||
// Custom overrides may want to decorate, group, sort entries.
|
||||
// Please note those are internal structures: if you copy this expect occasional breakage.
|
||||
// (if you don't need to modify the "Tabs.Size == 1" behavior/path it is recommend you call this function in your handler)
|
||||
void ImGui::DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar)
|
||||
{
|
||||
IM_UNUSED(ctx);
|
||||
|
|
@ -19388,8 +19395,8 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||
else if (rect_type == TRT_ColumnsRect) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->MinX, table->InnerClipRect.Min.y, c->MaxX, table->InnerClipRect.Min.y + table_instance->LastOuterHeight); }
|
||||
else if (rect_type == TRT_ColumnsWorkRect) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->WorkRect.Min.y, c->WorkMaxX, table->WorkRect.Max.y); }
|
||||
else if (rect_type == TRT_ColumnsClipRect) { ImGuiTableColumn* c = &table->Columns[n]; return c->ClipRect; }
|
||||
else if (rect_type == TRT_ColumnsContentHeadersUsed){ ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersUsed, table->InnerClipRect.Min.y + table_instance->LastFirstRowHeight); } // Note: y1/y2 not always accurate
|
||||
else if (rect_type == TRT_ColumnsContentHeadersIdeal){ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersIdeal, table->InnerClipRect.Min.y + table_instance->LastFirstRowHeight); }
|
||||
else if (rect_type == TRT_ColumnsContentHeadersUsed){ ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersUsed, table->InnerClipRect.Min.y + table_instance->LastTopHeadersRowHeight); } // Note: y1/y2 not always accurate
|
||||
else if (rect_type == TRT_ColumnsContentHeadersIdeal){ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersIdeal, table->InnerClipRect.Min.y + table_instance->LastTopHeadersRowHeight); }
|
||||
else if (rect_type == TRT_ColumnsContentFrozen) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXFrozen, table->InnerClipRect.Min.y + table_instance->LastFrozenHeight); }
|
||||
else if (rect_type == TRT_ColumnsContentUnfrozen) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y + table_instance->LastFrozenHeight, c->ContentMaxXUnfrozen, table->InnerClipRect.Max.y); }
|
||||
IM_ASSERT(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue