mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
added option for selecting which column are displayed in the game list, added optional game id column, and added config entry to disable making compressed games blue
This commit is contained in:
@ -143,6 +143,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
iso2->GetCompany() : iso2->GetDescription(indexOther);
|
||||
return strcasecmp(cmp1.c_str(), cmp2.c_str()) * t;
|
||||
}
|
||||
case CGameListCtrl::COLUMN_ID:
|
||||
return strcasecmp(iso1->GetUniqueID().c_str(), iso2->GetUniqueID().c_str()) * t;
|
||||
case CGameListCtrl::COLUMN_COUNTRY:
|
||||
if (iso1->GetCountry() > iso2->GetCountry())
|
||||
return 1 * t;
|
||||
@ -317,6 +319,7 @@ void CGameListCtrl::Update()
|
||||
// wii titles We show in the same column : company for GC games and
|
||||
// description for wii/wad games
|
||||
InsertColumn(COLUMN_NOTES, _("Notes"));
|
||||
InsertColumn(COLUMN_ID, _("ID"));
|
||||
InsertColumn(COLUMN_COUNTRY, "");
|
||||
InsertColumn(COLUMN_SIZE, _("Size"));
|
||||
InsertColumn(COLUMN_EMULATION_STATE, _("State"));
|
||||
@ -329,18 +332,19 @@ void CGameListCtrl::Update()
|
||||
|
||||
// set initial sizes for columns
|
||||
SetColumnWidth(COLUMN_DUMMY,0);
|
||||
SetColumnWidth(COLUMN_PLATFORM, 35 + platform_padding);
|
||||
SetColumnWidth(COLUMN_BANNER, 96 + platform_padding);
|
||||
SetColumnWidth(COLUMN_TITLE, 200 + platform_padding);
|
||||
SetColumnWidth(COLUMN_NOTES, 200 + platform_padding);
|
||||
SetColumnWidth(COLUMN_COUNTRY, 32 + platform_padding);
|
||||
SetColumnWidth(COLUMN_EMULATION_STATE, 50 + platform_padding);
|
||||
SetColumnWidth(COLUMN_PLATFORM, SConfig::GetInstance().m_showSystemColumn ? 35 + platform_padding : 0);
|
||||
SetColumnWidth(COLUMN_BANNER, SConfig::GetInstance().m_showBannerColumn ? 96 + platform_padding : 0);
|
||||
SetColumnWidth(COLUMN_TITLE, 175 + platform_padding);
|
||||
SetColumnWidth(COLUMN_NOTES, SConfig::GetInstance().m_showNotesColumn ? 150 + platform_padding : 0);
|
||||
SetColumnWidth(COLUMN_ID, SConfig::GetInstance().m_showIDColumn ? 75 + platform_padding : 0);
|
||||
SetColumnWidth(COLUMN_COUNTRY, SConfig::GetInstance().m_showRegionColumn ? 32 + platform_padding : 0);
|
||||
SetColumnWidth(COLUMN_EMULATION_STATE, SConfig::GetInstance().m_showStateColumn ? 50 + platform_padding : 0);
|
||||
|
||||
// add all items
|
||||
for (int i = 0; i < (int)m_ISOFiles.size(); i++)
|
||||
{
|
||||
InsertItemInReportView(i);
|
||||
if (m_ISOFiles[i]->IsCompressed())
|
||||
if (SConfig::GetInstance().m_ColorCompressed && m_ISOFiles[i]->IsCompressed())
|
||||
SetItemTextColour(i, wxColour(0xFF0000));
|
||||
}
|
||||
|
||||
@ -459,6 +463,9 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
// File size
|
||||
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
|
||||
|
||||
// Game ID
|
||||
SetItem(_Index, COLUMN_ID, rISOFile.GetUniqueID(), -1);
|
||||
|
||||
// Background color
|
||||
SetBackgroundColor();
|
||||
|
||||
@ -1278,20 +1285,29 @@ void CGameListCtrl::AutomaticColumnWidth()
|
||||
{
|
||||
SetColumnWidth(0, rc.GetWidth());
|
||||
}
|
||||
else if (GetColumnCount() > 4)
|
||||
else
|
||||
{
|
||||
|
||||
int resizable = rc.GetWidth() - (
|
||||
GetColumnWidth(COLUMN_BANNER)
|
||||
GetColumnWidth(COLUMN_PLATFORM)
|
||||
+ GetColumnWidth(COLUMN_BANNER)
|
||||
+ GetColumnWidth(COLUMN_ID)
|
||||
+ GetColumnWidth(COLUMN_COUNTRY)
|
||||
+ GetColumnWidth(COLUMN_SIZE)
|
||||
+ GetColumnWidth(COLUMN_EMULATION_STATE)
|
||||
+ GetColumnWidth(COLUMN_PLATFORM));
|
||||
+ GetColumnWidth(COLUMN_EMULATION_STATE));
|
||||
|
||||
// We hide the Notes column if the window is too small
|
||||
if (resizable > 400)
|
||||
{
|
||||
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
||||
SetColumnWidth(COLUMN_NOTES, resizable / 2);
|
||||
if (SConfig::GetInstance().m_showNotesColumn)
|
||||
{
|
||||
SetColumnWidth(COLUMN_TITLE, resizable / 2);
|
||||
SetColumnWidth(COLUMN_NOTES, resizable / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetColumnWidth(COLUMN_TITLE, resizable);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user