WindowRounding=9.0f;// Radius of window corners rounding. Set to 0.0f to have rectangular windows
WindowRounding=9.0f;// Radius of window corners rounding. Set to 0.0f to have rectangular windows
WindowTitleAlign=ImGuiAlign_Left;// Alignment for title bar text
WindowTitleAlign=ImVec2(0.0f,0.5f);// Alignment for title bar text
ChildWindowRounding=0.0f;// Radius of child window corners rounding. Set to 0.0f to have rectangular child windows
ChildWindowRounding=0.0f;// Radius of child window corners rounding. Set to 0.0f to have rectangular child windows
FramePadding=ImVec2(4,3);// Padding within a framed rectangle (used by most widgets)
FramePadding=ImVec2(4,3);// Padding within a framed rectangle (used by most widgets)
FrameRounding=0.0f;// Radius of frame corners rounding. Set to 0.0f to have rectangular frames (used by most widgets).
FrameRounding=0.0f;// Radius of frame corners rounding. Set to 0.0f to have rectangular frames (used by most widgets).
@ -788,6 +788,7 @@ ImGuiStyle::ImGuiStyle()
ScrollbarRounding=9.0f;// Radius of grab corners rounding for scrollbar
ScrollbarRounding=9.0f;// Radius of grab corners rounding for scrollbar
GrabMinSize=10.0f;// Minimum width/height of a grab box for slider/scrollbar
GrabMinSize=10.0f;// Minimum width/height of a grab box for slider/scrollbar
GrabRounding=0.0f;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
GrabRounding=0.0f;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
ButtonTextAlign=ImVec2(0.5f,0.5f);// Alignment of button text when button is larger than text.
DisplayWindowPadding=ImVec2(22,22);// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
DisplayWindowPadding=ImVec2(22,22);// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
DisplaySafeAreaPadding=ImVec2(4,4);// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
DisplaySafeAreaPadding=ImVec2(4,4);// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
AntiAliasedLines=true;// Enable anti-aliasing on lines/borders. Disable if you are really short on CPU/GPU.
AntiAliasedLines=true;// Enable anti-aliasing on lines/borders. Disable if you are really short on CPU/GPU.
ImVec2clip_max=ImVec2(window->Pos.x+window->Size.x-(p_open?title_bar_rect.GetHeight()-3:style.FramePadding.x),text_max.y);// Match the size of CloseWindowButton()
clip_rect.Max=ImVec2(window->Pos.x+window->Size.x-(p_open?title_bar_rect.GetHeight()-3:style.FramePadding.x),text_max.y);// Match the size of CloseWindowButton()
if((flags&ImGuiButtonFlags_AlignTextBaseLine)&&style.FramePadding.y<window->DC.CurrentLineTextBaseOffset)// Try to vertically align buttons that are smaller/have no padding so that text baseline matches (bit hacky, since it shouldn't be a flag)
ImVec2size=CalcItemSize(size_arg,CalcItemWidth(),(is_multiline?GetTextLineHeight()*8.0f:label_size.y)+style.FramePadding.y*2.0f);// Arbitrary default of 8 lines high for multi-line
ImVec2size=CalcItemSize(size_arg,CalcItemWidth(),(is_multiline?GetTextLineHeight()*8.0f:label_size.y)+style.FramePadding.y*2.0f);// Arbitrary default of 8 lines high for multi-line
group_bb.Max.y-=style.ItemSpacing.y;// Cancel out last vertical spacing because we are adding one ourselves.
group_bb.Max.y-=g.Style.ItemSpacing.y;// Cancel out last vertical spacing because we are adding one ourselves.
group_bb.Max=ImMax(group_bb.Min,group_bb.Max);
group_bb.Max=ImMax(group_bb.Min,group_bb.Max);
window->DC.CursorPos=group_data.BackupCursorPos;
window->DC.CursorPos=group_data.BackupCursorPos;
@ -10184,6 +10191,11 @@ void ImGui::EndGroup()
ItemAdd(group_bb,NULL);
ItemAdd(group_bb,NULL);
}
}
// If the current ActiveId was declared within the boundary of our group, we copy it to LastItemId so IsItemActive() will function on the entire group.
// It would be be neater if we replaced window.DC.LastItemId by e.g. 'bool LastItemIsActive', but if you search for LastItemId you'll notice it is only used in that context.
floatWindowRounding;// Radius of window corners rounding. Set to 0.0f to have rectangular windows
floatWindowRounding;// Radius of window corners rounding. Set to 0.0f to have rectangular windows
ImGuiAlignWindowTitleAlign;// Alignment for title bar text
ImVec2 WindowTitleAlign;// Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.
floatChildWindowRounding;// Radius of child window corners rounding. Set to 0.0f to have rectangular windows
floatChildWindowRounding;// Radius of child window corners rounding. Set to 0.0f to have rectangular windows
ImVec2FramePadding;// Padding within a framed rectangle (used by most widgets)
ImVec2FramePadding;// Padding within a framed rectangle (used by most widgets)
floatFrameRounding;// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
floatFrameRounding;// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
@ -749,8 +740,9 @@ struct ImGuiStyle
floatColumnsMinSpacing;// Minimum horizontal spacing between two columns
floatColumnsMinSpacing;// Minimum horizontal spacing between two columns
floatScrollbarSize;// Width of the vertical scrollbar, Height of the horizontal scrollbar
floatScrollbarSize;// Width of the vertical scrollbar, Height of the horizontal scrollbar
floatScrollbarRounding;// Radius of grab corners for scrollbar
floatScrollbarRounding;// Radius of grab corners for scrollbar
floatGrabMinSize;// Minimum width/height of a grab box for slider/scrollbar
floatGrabMinSize;// Minimum width/height of a grab box for slider/scrollbar.
floatGrabRounding;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
floatGrabRounding;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
ImVec2ButtonTextAlign;// Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered.
ImVec2DisplayWindowPadding;// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
ImVec2DisplayWindowPadding;// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
ImVec2DisplaySafeAreaPadding;// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
ImVec2DisplaySafeAreaPadding;// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
boolAntiAliasedLines;// Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
boolAntiAliasedLines;// Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
ImGui::SliderFloat2("ButtonTextAlign",(float*)&style.ButtonTextAlign,0.0f,1.0f,"%.2f");ImGui::SameLine();ShowHelpMarker("Alignment applies when a button is larger than its text content.");
// NB: All position are in absolute pixels coordinates (not window coordinates)
// NB: All position are in absolute pixels coordinates (not window coordinates)
// FIXME: All those functions are a mess and needs to be refactored into something decent. Avoid use outside of imgui.cpp!
// FIXME: All those functions are a mess and needs to be refactored into something decent. AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION.
// We need: a sort of symbol library, preferably baked into font atlas when possible + decent text rendering helpers.
// We need: a sort of symbol library, preferably baked into font atlas when possible + decent text rendering helpers.