mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Internal: Removed unused fields from ImGuiMenuColumns.
This commit is contained in:
		@@ -5674,7 +5674,6 @@ void ImGui::Value(const char* prefix, float v, const char* float_format)
 | 
			
		||||
// Helpers for internal use
 | 
			
		||||
ImGuiMenuColumns::ImGuiMenuColumns()
 | 
			
		||||
{
 | 
			
		||||
    Count = 0;
 | 
			
		||||
    Spacing = Width = NextWidth = 0.0f;
 | 
			
		||||
    memset(Pos, 0, sizeof(Pos));
 | 
			
		||||
    memset(NextWidths, 0, sizeof(NextWidths));
 | 
			
		||||
@@ -5682,12 +5681,12 @@ ImGuiMenuColumns::ImGuiMenuColumns()
 | 
			
		||||
 | 
			
		||||
void ImGuiMenuColumns::Update(int count, float spacing, bool clear)
 | 
			
		||||
{
 | 
			
		||||
    IM_ASSERT(Count <= IM_ARRAYSIZE(Pos));
 | 
			
		||||
    Count = count;
 | 
			
		||||
    IM_ASSERT(count == IM_ARRAYSIZE(Pos));
 | 
			
		||||
    Width = NextWidth = 0.0f;
 | 
			
		||||
    Spacing = spacing;
 | 
			
		||||
    if (clear) memset(NextWidths, 0, sizeof(NextWidths));
 | 
			
		||||
    for (int i = 0; i < Count; i++)
 | 
			
		||||
    if (clear) 
 | 
			
		||||
        memset(NextWidths, 0, sizeof(NextWidths));
 | 
			
		||||
    for (int i = 0; i < IM_ARRAYSIZE(Pos); i++)
 | 
			
		||||
    {
 | 
			
		||||
        if (i > 0 && NextWidths[i] > 0.0f)
 | 
			
		||||
            Width += Spacing;
 | 
			
		||||
@@ -5703,7 +5702,7 @@ float ImGuiMenuColumns::DeclColumns(float w0, float w1, float w2) // not using v
 | 
			
		||||
    NextWidths[0] = ImMax(NextWidths[0], w0);
 | 
			
		||||
    NextWidths[1] = ImMax(NextWidths[1], w1);
 | 
			
		||||
    NextWidths[2] = ImMax(NextWidths[2], w2);
 | 
			
		||||
    for (int i = 0; i < 3; i++)
 | 
			
		||||
    for (int i = 0; i < IM_ARRAYSIZE(Pos); i++)
 | 
			
		||||
        NextWidth += NextWidths[i] + ((i > 0 && NextWidths[i] > 0.0f) ? Spacing : 0.0f);
 | 
			
		||||
    return ImMax(Width, NextWidth);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user