mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Merge pull request #4811 from lioncash/memcardmanager
MemcardManager: Minor changes
This commit is contained in:
commit
529dc6aa53
@ -809,7 +809,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
|
|||||||
popupMenu.Append(ID_SAVEEXPORT_A + slot, _("Export Save"));
|
popupMenu.Append(ID_SAVEEXPORT_A + slot, _("Export Save"));
|
||||||
popupMenu.Append(ID_EXPORTALL_A + slot, _("Export all saves"));
|
popupMenu.Append(ID_EXPORTALL_A + slot, _("Export all saves"));
|
||||||
|
|
||||||
popupMenu.FindItem(ID_COPYFROM_A + slot)->Enable(__mcmSettings.twoCardsLoaded);
|
popupMenu.FindItem(ID_COPYFROM_A + slot)->Enable(mgr_settings.twoCardsLoaded);
|
||||||
|
|
||||||
popupMenu.AppendSeparator();
|
popupMenu.AppendSeparator();
|
||||||
|
|
||||||
@ -820,9 +820,9 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
|
|||||||
wxString::Format(_("Set as default Memory Card %c"), 'A' + slot));
|
wxString::Format(_("Set as default Memory Card %c"), 'A' + slot));
|
||||||
popupMenu.AppendCheckItem(ID_USEPAGES, _("Enable pages"));
|
popupMenu.AppendCheckItem(ID_USEPAGES, _("Enable pages"));
|
||||||
|
|
||||||
popupMenu.FindItem(ID_PREVPAGE_A + slot)->Enable(prevPage && __mcmSettings.usePages);
|
popupMenu.FindItem(ID_PREVPAGE_A + slot)->Enable(prevPage && mgr_settings.usePages);
|
||||||
popupMenu.FindItem(ID_NEXTPAGE_A + slot)->Enable(nextPage && __mcmSettings.usePages);
|
popupMenu.FindItem(ID_NEXTPAGE_A + slot)->Enable(nextPage && mgr_settings.usePages);
|
||||||
popupMenu.FindItem(ID_USEPAGES)->Check(__mcmSettings.usePages);
|
popupMenu.FindItem(ID_USEPAGES)->Check(mgr_settings.usePages);
|
||||||
|
|
||||||
popupMenu.AppendSeparator();
|
popupMenu.AppendSeparator();
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
|
|||||||
// for (int i = COLUMN_BANNER; i <= COLUMN_FIRSTBLOCK; i++)
|
// for (int i = COLUMN_BANNER; i <= COLUMN_FIRSTBLOCK; i++)
|
||||||
for (int i = COLUMN_TITLE; i <= COLUMN_FIRSTBLOCK; i++)
|
for (int i = COLUMN_TITLE; i <= COLUMN_FIRSTBLOCK; i++)
|
||||||
{
|
{
|
||||||
popupMenu.FindItem(i)->Check(__mcmSettings.column[i]);
|
popupMenu.FindItem(i)->Check(mgr_settings.column[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PopupMenu(&popupMenu);
|
PopupMenu(&popupMenu);
|
||||||
|
@ -28,23 +28,23 @@ public:
|
|||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE();
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
int page[2];
|
std::array<int, 2> page;
|
||||||
int itemsPerPage;
|
int itemsPerPage;
|
||||||
int maxPages;
|
int maxPages;
|
||||||
std::string DefaultMemcard[2];
|
std::array<std::string, 2> DefaultMemcard;
|
||||||
std::string DefaultIOPath;
|
std::string DefaultIOPath;
|
||||||
IniFile MemcardManagerIni;
|
IniFile MemcardManagerIni;
|
||||||
IniFile::Section* iniMemcardSection;
|
IniFile::Section* iniMemcardSection;
|
||||||
|
|
||||||
wxButton* m_CopyFrom[2];
|
std::array<wxButton*, 2> m_CopyFrom;
|
||||||
wxButton* m_SaveImport[2];
|
std::array<wxButton*, 2> m_SaveImport;
|
||||||
wxButton* m_SaveExport[2];
|
std::array<wxButton*, 2> m_SaveExport;
|
||||||
wxButton* m_Delete[2];
|
std::array<wxButton*, 2> m_Delete;
|
||||||
wxButton* m_NextPage[2];
|
std::array<wxButton*, 2> m_NextPage;
|
||||||
wxButton* m_PrevPage[2];
|
std::array<wxButton*, 2> m_PrevPage;
|
||||||
wxButton* m_ConvertToGci;
|
wxButton* m_ConvertToGci;
|
||||||
wxFilePickerCtrl* m_MemcardPath[2];
|
std::array<wxFilePickerCtrl*, 2> m_MemcardPath;
|
||||||
wxStaticText* t_Status[2];
|
std::array<wxStaticText*, 2> t_Status;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -108,24 +108,24 @@ private:
|
|||||||
bool LoadSettings();
|
bool LoadSettings();
|
||||||
bool SaveSettings();
|
bool SaveSettings();
|
||||||
|
|
||||||
struct _mcmSettings
|
struct ManagerSettings
|
||||||
{
|
{
|
||||||
bool twoCardsLoaded;
|
bool twoCardsLoaded;
|
||||||
bool usePages;
|
bool usePages;
|
||||||
bool column[NUMBER_OF_COLUMN + 1];
|
std::array<bool, NUMBER_OF_COLUMN + 1> column;
|
||||||
} mcmSettings;
|
} mcmSettings;
|
||||||
|
|
||||||
class CMemcardListCtrl : public wxListCtrl
|
class CMemcardListCtrl : public wxListCtrl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMemcardListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size,
|
CMemcardListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size,
|
||||||
long style, _mcmSettings& _mcmSetngs)
|
long style, ManagerSettings& manager_settings)
|
||||||
: wxListCtrl(parent, id, pos, size, style), __mcmSettings(_mcmSetngs)
|
: wxListCtrl(parent, id, pos, size, style), mgr_settings(manager_settings)
|
||||||
{
|
{
|
||||||
Bind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this);
|
Bind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this);
|
||||||
}
|
}
|
||||||
~CMemcardListCtrl() { Unbind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this); }
|
~CMemcardListCtrl() { Unbind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this); }
|
||||||
_mcmSettings& __mcmSettings;
|
ManagerSettings& mgr_settings;
|
||||||
bool prevPage;
|
bool prevPage;
|
||||||
bool nextPage;
|
bool nextPage;
|
||||||
|
|
||||||
@ -134,5 +134,5 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
wxSize m_image_list_size;
|
wxSize m_image_list_size;
|
||||||
CMemcardListCtrl* m_MemcardList[2];
|
std::array<CMemcardListCtrl*, 2> m_MemcardList;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user