2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:43:35 -06:00
|
|
|
// Refer to the license.txt file included.
|
2010-07-21 19:48:48 -06:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2010-07-21 19:48:48 -06:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <wx/panel.h>
|
2010-07-21 19:48:48 -06:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "Core/GeckoCode.h"
|
2014-02-22 15:36:30 -07:00
|
|
|
|
|
|
|
class IniFile;
|
|
|
|
class wxButton;
|
|
|
|
class wxCheckListBox;
|
|
|
|
class wxListBox;
|
|
|
|
class wxStaticText;
|
|
|
|
class wxTextCtrl;
|
2010-07-21 19:48:48 -06:00
|
|
|
|
2016-07-22 19:05:22 -06:00
|
|
|
// GetClientData() -> GeckoCode* [immutable]
|
|
|
|
wxDECLARE_EVENT(DOLPHIN_EVT_GECKOCODE_TOGGLED, wxCommandEvent);
|
|
|
|
|
2010-07-21 19:48:48 -06:00
|
|
|
namespace Gecko
|
|
|
|
{
|
|
|
|
class CodeConfigPanel : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
CodeConfigPanel(wxWindow* const parent);
|
2010-07-21 19:48:48 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void LoadCodes(const IniFile& globalIni, const IniFile& localIni, const std::string& gameid = "",
|
|
|
|
bool checkRunning = false);
|
|
|
|
const std::vector<GeckoCode>& GetCodes() const { return m_gcodes; }
|
2018-04-12 06:18:04 -06:00
|
|
|
|
2010-07-21 19:48:48 -06:00
|
|
|
protected:
|
2016-06-24 02:43:46 -06:00
|
|
|
void UpdateInfoBox(wxCommandEvent&);
|
|
|
|
void ToggleCode(wxCommandEvent& evt);
|
|
|
|
void DownloadCodes(wxCommandEvent&);
|
|
|
|
// void ApplyChanges(wxCommandEvent&);
|
2010-07-22 23:22:12 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void UpdateCodeList(bool checkRunning = false);
|
2010-07-21 19:48:48 -06:00
|
|
|
|
|
|
|
private:
|
2016-06-24 02:43:46 -06:00
|
|
|
std::vector<GeckoCode> m_gcodes;
|
|
|
|
|
|
|
|
std::string m_gameid;
|
|
|
|
|
|
|
|
// wxwidgets stuff
|
|
|
|
wxCheckListBox* m_listbox_gcodes;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
wxStaticText *label_name, *label_notes, *label_creator;
|
|
|
|
wxTextCtrl* textctrl_notes;
|
|
|
|
wxListBox* listbox_codes;
|
|
|
|
} m_infobox;
|
|
|
|
wxButton* btn_download;
|
2010-07-21 19:48:48 -06:00
|
|
|
};
|
|
|
|
}
|