mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Update the behavior for GameListCtrl to reflect the possibility of all games being hidden
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3387 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
92cfcd00d1
commit
bb412e5641
@ -488,7 +488,35 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
|
||||
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||
{
|
||||
BootGame();
|
||||
// Show all platforms and regions if...
|
||||
// 1. All platforms are set to hide
|
||||
// 2. All Regions are set to hide
|
||||
// Otherwise call BootGame to either...
|
||||
// 1. Boot the selected iso
|
||||
// 2. Call BrowseForDirectory and boot the default or last loaded iso.
|
||||
// TODO: (LPFaint99) We shouldn't boot an iso after BrowseForDirectory
|
||||
if (!m_GameListCtrl->GetGameNames().size() &&
|
||||
!((SConfig::GetInstance().m_ListGC ||
|
||||
SConfig::GetInstance().m_ListWii ||
|
||||
SConfig::GetInstance().m_ListWad) &&
|
||||
(SConfig::GetInstance().m_ListJap ||
|
||||
SConfig::GetInstance().m_ListUsa ||
|
||||
SConfig::GetInstance().m_ListPal)))
|
||||
{
|
||||
SConfig::GetInstance().m_ListGC = SConfig::GetInstance().m_ListWii =
|
||||
SConfig::GetInstance().m_ListWad = SConfig::GetInstance().m_ListJap =
|
||||
SConfig::GetInstance().m_ListUsa = SConfig::GetInstance().m_ListPal = true;
|
||||
|
||||
GetMenuBar()->FindItem(IDM_LISTGC)->Check(true);
|
||||
GetMenuBar()->FindItem(IDM_LISTWII)->Check(true);
|
||||
GetMenuBar()->FindItem(IDM_LISTWAD)->Check(true);
|
||||
GetMenuBar()->FindItem(IDM_LISTJAP)->Check(true);
|
||||
GetMenuBar()->FindItem(IDM_LISTUSA)->Check(true);
|
||||
GetMenuBar()->FindItem(IDM_LISTPAL)->Check(true);
|
||||
|
||||
m_GameListCtrl->Update();
|
||||
}
|
||||
else BootGame();
|
||||
}
|
||||
|
||||
void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
|
@ -229,10 +229,23 @@ void CGameListCtrl::Update()
|
||||
}
|
||||
else
|
||||
{
|
||||
InsertColumn(COLUMN_BANNER, _("No ISOs found"));
|
||||
|
||||
std::string errorString;
|
||||
if ((SConfig::GetInstance().m_ListGC ||
|
||||
SConfig::GetInstance().m_ListWii ||
|
||||
SConfig::GetInstance().m_ListWad) &&
|
||||
(SConfig::GetInstance().m_ListJap ||
|
||||
SConfig::GetInstance().m_ListUsa ||
|
||||
SConfig::GetInstance().m_ListPal))
|
||||
{
|
||||
errorString = "Dolphin could not find any GC/Wii ISOs. Doubleclick here to browse for files...";
|
||||
}
|
||||
else
|
||||
{
|
||||
errorString = "Dolphin is currently set to hide all games. Doubleclick here to show all games...";
|
||||
}
|
||||
InsertColumn(COLUMN_BANNER, _("No ISOs or WADS found"));
|
||||
long index = InsertItem(0, wxString::FromAscii("msgRow"));
|
||||
SetItem(index, COLUMN_BANNER, _("Dolphin could not find any GC/Wii ISOs. Doubleclick here to browse for files..."));
|
||||
SetItem(index, COLUMN_BANNER, wxString::FromAscii(errorString.c_str()));
|
||||
SetItemFont(index, *wxITALIC_FONT);
|
||||
SetColumnWidth(COLUMN_BANNER, wxLIST_AUTOSIZE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user