@ -3290,7 +3290,10 @@ void ImGui::Shutdown(ImGuiContext* context)
// The fonts atlas can be used prior to calling NewFrame(), so we clear it even if g.Initialized is FALSE (which would happen if we never called NewFrame)
ImGuiContext & g = * context ;
if ( g . IO . Fonts & & g . FontAtlasOwnedByContext )
{
g . IO . Fonts - > Locked = false ;
IM_DELETE ( g . IO . Fonts ) ;
}
g . IO . Fonts = NULL ;
// Cleanup of other data are conditional on actually having initialized ImGui.
@ -4309,12 +4312,12 @@ ImVec2 ImGui::CalcWindowExpectedSize(ImGuiWindow* window)
return CalcSizeAfterConstraint ( window , CalcSizeAutoFit ( window , size_contents ) ) ;
}
static float GetScrollMaxX( ImGuiWindow * window )
float ImGui: : GetWindow ScrollMaxX( ImGuiWindow * window )
{
return ImMax ( 0.0f , window - > SizeContents . x - ( window - > SizeFull . x - window - > ScrollbarSizes . x ) ) ;
}
static float GetScrollMaxY( ImGuiWindow * window )
float ImGui: : GetWindow ScrollMaxY( ImGuiWindow * window )
{
return ImMax ( 0.0f , window - > SizeContents . y - ( window - > SizeFull . y - window - > ScrollbarSizes . y ) ) ;
}
@ -4342,8 +4345,8 @@ static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window, bool s
scroll = ImMax ( scroll , ImVec2 ( 0.0f , 0.0f ) ) ;
if ( ! window - > Collapsed & & ! window - > SkipItems )
{
scroll . x = ImMin ( scroll . x , GetScrollMaxX( window ) ) ;
scroll . y = ImMin ( scroll . y , GetScrollMaxY( window ) ) ;
scroll . x = ImMin ( scroll . x , ImGui: : GetWindow ScrollMaxX( window ) ) ;
scroll . y = ImMin ( scroll . y , ImGui: : GetWindow ScrollMaxY( window ) ) ;
}
return scroll ;
}
@ -6009,12 +6012,12 @@ float ImGui::GetScrollY()
float ImGui : : GetScrollMaxX ( )
{
return Get ScrollMaxX( GImGui - > CurrentWindow ) ;
return Get Window ScrollMaxX( GImGui - > CurrentWindow ) ;
}
float ImGui : : GetScrollMaxY ( )
{
return Get ScrollMaxY( GImGui - > CurrentWindow ) ;
return Get Window ScrollMaxY( GImGui - > CurrentWindow ) ;
}
void ImGui : : SetScrollX ( float scroll_x )
@ -8918,7 +8921,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
( flags & ImGuiWindowFlags_ChildWindow ) ? " Child " : " " , ( flags & ImGuiWindowFlags_Tooltip ) ? " Tooltip " : " " , ( flags & ImGuiWindowFlags_Popup ) ? " Popup " : " " ,
( flags & ImGuiWindowFlags_Modal ) ? " Modal " : " " , ( flags & ImGuiWindowFlags_ChildMenu ) ? " ChildMenu " : " " , ( flags & ImGuiWindowFlags_NoSavedSettings ) ? " NoSavedSettings " : " " ,
( flags & ImGuiWindowFlags_NoInputs ) ? " NoInputs " : " " , ( flags & ImGuiWindowFlags_AlwaysAutoResize ) ? " AlwaysAutoResize " : " " ) ;
ImGui : : BulletText ( " Scroll: (%.2f/%.2f,%.2f/%.2f) " , window - > Scroll . x , Get ScrollMaxX( window ) , window - > Scroll . y , Get ScrollMaxY( window ) ) ;
ImGui : : BulletText ( " Scroll: (%.2f/%.2f,%.2f/%.2f) " , window - > Scroll . x , Get Window ScrollMaxX( window ) , window - > Scroll . y , Get Window ScrollMaxY( window ) ) ;
ImGui : : BulletText ( " Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d " , window - > Active , window - > WasActive , window - > WriteAccessed , ( window - > Active | | window - > WasActive ) ? window - > BeginOrderWithinContext : - 1 ) ;
ImGui : : BulletText ( " Appearing: %d, Hidden: %d (Reg %d Resize %d), SkipItems: %d " , window - > Appearing , window - > Hidden , window - > HiddenFramesRegular , window - > HiddenFramesForResize , window - > SkipItems ) ;
ImGui : : BulletText ( " NavLastIds: 0x%08X,0x%08X, NavLayerActiveMask: %X " , window - > NavLastIds [ 0 ] , window - > NavLastIds [ 1 ] , window - > DC . NavLayerActiveMask ) ;