@ -667,7 +667,7 @@ static void SaveIniSettingsToDisk(const char* ini_filename);
static void SaveIniSettingsToMemory ( ImVector < char > & out_buf ) ;
static void MarkIniSettingsDirty ( ImGuiWindow * window ) ;
static ImRect GetVi sibl eRect( ) ;
static ImRect GetVi ewport Rect( ) ;
static void CloseInactivePopups ( ImGuiWindow * ref_window ) ;
static void ClosePopupToLevel ( int remaining ) ;
@ -3685,7 +3685,7 @@ ImVec2 ImGui::GetItemRectSize()
return window - > DC . LastItemRect . GetSize ( ) ;
}
static ImRect GetVi sibl eRect( )
static ImRect GetVi ewport Rect( )
{
ImGuiContext & g = * GImGui ;
if ( g . IO . DisplayVisibleMin . x ! = g . IO . DisplayVisibleMax . x & & g . IO . DisplayVisibleMin . y ! = g . IO . DisplayVisibleMax . y )
@ -4104,7 +4104,7 @@ static ImVec2 FindBestWindowPosForPopup(const ImVec2& ref_pos, const ImVec2& siz
// r_avoid = the rectangle to avoid (e.g. for tooltip it is a rectangle around the mouse cursor which we want to avoid. for popups it's a small point around the cursor.)
// r_outer = the visible area rectangle, minus safe area padding. If our popup size won't fit because of safe area padding we ignore it.
ImVec2 safe_padding = style . DisplaySafeAreaPadding ;
ImRect r_outer ( GetVi sibl eRect( ) ) ;
ImRect r_outer ( GetVi ewport Rect( ) ) ;
r_outer . Expand ( ImVec2 ( ( size . x - r_outer . GetWidth ( ) > safe_padding . x * 2 ) ? - safe_padding . x : 0.0f , ( size . y - r_outer . GetHeight ( ) > safe_padding . y * 2 ) ? - safe_padding . y : 0.0f ) ) ;
ImVec2 base_pos_clamped = ImClamp ( ref_pos , r_outer . Min , r_outer . Max - size ) ;
//GImGui->OverlayDrawList.AddRect(r_avoid.Min, r_avoid.Max, IM_COL32(255,0,0,255));
@ -4779,15 +4779,15 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
window - > DrawList - > Clear ( ) ;
window - > DrawList - > Flags = ( g . Style . AntiAliasedLines ? ImDrawListFlags_AntiAliasedLines : 0 ) | ( g . Style . AntiAliasedFill ? ImDrawListFlags_AntiAliasedFill : 0 ) ;
window - > DrawList - > PushTextureID ( g . Font - > ContainerAtlas - > TexID ) ;
ImRect fullscreen_rect( GetVisible Rect( ) ) ;
ImRect viewport_rect( GetViewport Rect( ) ) ;
if ( ( flags & ImGuiWindowFlags_ChildWindow ) & & ! ( flags & ImGuiWindowFlags_Popup ) & & ! window_is_child_tooltip )
PushClipRect ( parent_window - > ClipRect . Min , parent_window - > ClipRect . Max , true ) ;
else
PushClipRect ( fullscreen_rect. Min , fullscreen _rect. Max , true ) ;
PushClipRect ( viewport_rect. Min , viewport _rect. Max , true ) ;
// Draw modal window background (darkens what is behind them)
if ( ( flags & ImGuiWindowFlags_Modal ) ! = 0 & & window = = GetFrontMostModalRootWindow ( ) )
window - > DrawList - > AddRectFilled ( fullscreen_rect. Min , fullscreen _rect. Max , GetColorU32 ( ImGuiCol_ModalWindowDarkening , g . ModalWindowDarkeningRatio ) ) ;
window - > DrawList - > AddRectFilled ( viewport_rect. Min , viewport _rect. Max , GetColorU32 ( ImGuiCol_ModalWindowDarkening , g . ModalWindowDarkeningRatio ) ) ;
// Draw window + handle manual resize
const float window_rounding = window - > WindowRounding ;