BeginMainMenuBar: Followup to 1e41bad9. Removed public window flag. DisplaySafeAreaPadding defaults to (3,3) instead of (4.4). Comments, tab to spaces, Changelog. (#1439)
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
- Window: Fixed default proportional item width lagging by one frame on resize.
- Window: Fixed default proportional item width lagging by one frame on resize.
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
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.
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(3,3);// 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.
MouseCursorScale=1.0f;// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
MouseCursorScale=1.0f;// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
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.
AntiAliasedFill=true;// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
AntiAliasedFill=true;// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
menu_bar_rect.ClipWith(window->Rect());// Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them.
menu_bar_rect.ClipWith(window->Rect());// Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them.
// We don't clip with regular window clipping rectangle as it is already set to the area below. However we clip with window full rect.
// We don't clip with current window clipping rectangle as it is already set to the area below. However we clip with window full rect.
// We remove 1 worth of rounding to Max.x to that text in long menus don't tend to display over the lower-right rounded area, which looks particularly glitchy.
// We remove 1 worth of rounding to Max.x to that text in long menus and small windows don't tend to display over the lower-right rounded area, which looks particularly glitchy.
window->DC.MenuBarOffset.x=window->DC.CursorPos.x-window->MenuBarRect().Min.x; // Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.
ImGuiWindowFlags_Tooltip=1<<25,// Don't use! For internal use by BeginTooltip()
ImGuiWindowFlags_Tooltip=1<<25,// Don't use! For internal use by BeginTooltip()
ImGuiWindowFlags_Popup=1<<26,// Don't use! For internal use by BeginPopup()
ImGuiWindowFlags_Popup=1<<26,// Don't use! For internal use by BeginPopup()
ImGuiWindowFlags_Modal=1<<27,// Don't use! For internal use by BeginPopupModal()
ImGuiWindowFlags_Modal=1<<27,// Don't use! For internal use by BeginPopupModal()
ImGuiWindowFlags_ChildMenu=1<<28,// Don't use! For internal use by BeginMenu()
ImGuiWindowFlags_ChildMenu=1<<28// Don't use! For internal use by BeginMenu()
ImGuiWindowFlags_MainMenuBar=1<<29// Don't use! For internal use by BeginMainMenuBar()
};
};
// Flags for ImGui::InputText()
// Flags for ImGui::InputText()
@ -981,7 +980,7 @@ struct ImGuiStyle
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.
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 edges of your screen (e.g. on a TV) increase the safe area padding. Apply to popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly!
floatMouseCursorScale;// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
floatMouseCursorScale;// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
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.
boolAntiAliasedFill;// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
boolAntiAliasedFill;// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
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.");
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.");
ImGui::Text("Safe Area Padding");ImGui::SameLine();ShowHelpMarker("Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured).");
intNavLayerActiveMask;// Which layer have been written to (result from previous frame)
intNavLayerActiveMask;// Which layer have been written to (result from previous frame)
intNavLayerActiveMaskNext;// Which layer have been written to (buffer for current frame)
intNavLayerActiveMaskNext;// Which layer have been written to (buffer for current frame)
boolMenuBarAppending;// FIXME: Remove this
boolMenuBarAppending;// FIXME: Remove this
ImVec2MenuBarOffset;
ImVec2MenuBarOffset;// MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.