Index: source/gui/COList.cpp =================================================================== --- source/gui/COList.cpp +++ source/gui/COList.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -148,6 +148,11 @@ float xpos = 0; for (COListColumn column : m_Columns) { + bool hidden = false; + GUI::GetSetting(this, "hidden_" + column.m_Id, hidden); + if (hidden) + continue; + float width = column.m_Width; // Check if it's a decimal value, and if so, assume relative positioning. if (column.m_Width < 1 && column.m_Width > 0) @@ -271,6 +276,8 @@ m_Columns.push_back(column); AddSetting(GUIST_CGUIList, "list_" + column.m_Id); + AddSetting(GUIST_bool, "hidden_" + column.m_Id); + SetupText(); return true; @@ -372,6 +379,11 @@ float xpos = 0; for (size_t col = 0; col < m_Columns.size(); ++col) { + bool hidden = false; + GUI::GetSetting(this, "hidden_" + m_Columns[col].m_Id, hidden); + if (hidden) + continue; + // Check if it's a decimal value, and if so, assume relative positioning. float width = m_Columns[col].m_Width; if (m_Columns[col].m_Width < 1 && m_Columns[col].m_Width > 0) @@ -432,6 +444,11 @@ xpos = 0; for (size_t col = 0; col < objectsCount; ++col) { + bool hidden = false; + GUI::GetSetting(this, "hidden_" + m_Columns[col].m_Id, hidden); + if (hidden) + continue; + // Determine text position and width const CPos textPos = rect.TopLeft() + CPos(xpos, -scroll + m_ItemsYPositions[i]);