2013-04-17 21:43:35 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// 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 wxCommandEvent;
|
|
|
|
class wxListBox;
|
|
|
|
class wxStaticText;
|
|
|
|
class wxTextCtrl;
|
|
|
|
class wxWindow;
|
2010-07-21 19:48:48 -06:00
|
|
|
|
|
|
|
namespace Gecko
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class CodeConfigPanel : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CodeConfigPanel(wxWindow* const parent);
|
|
|
|
|
|
|
|
|
2013-09-23 00:39:14 -06:00
|
|
|
void LoadCodes(const IniFile& globalIni, const IniFile& localIni, const std::string& gameid = "", bool checkRunning = false);
|
2010-07-21 19:48:48 -06:00
|
|
|
const std::vector<GeckoCode>& GetCodes() const { return m_gcodes; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void UpdateInfoBox(wxCommandEvent&);
|
|
|
|
void ToggleCode(wxCommandEvent& evt);
|
2010-07-22 23:22:12 -06:00
|
|
|
void DownloadCodes(wxCommandEvent&);
|
|
|
|
//void ApplyChanges(wxCommandEvent&);
|
|
|
|
|
2013-05-04 11:27:39 -06:00
|
|
|
void UpdateCodeList(bool checkRunning = false);
|
2010-07-21 19:48:48 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<GeckoCode> m_gcodes;
|
|
|
|
|
2010-07-22 23:22:12 -06:00
|
|
|
std::string m_gameid;
|
|
|
|
|
2010-07-21 19:48:48 -06:00
|
|
|
// wxwidgets stuff
|
2014-02-16 21:51:41 -07:00
|
|
|
wxCheckListBox* m_listbox_gcodes;
|
2010-07-21 19:48:48 -06:00
|
|
|
struct
|
|
|
|
{
|
2014-02-16 21:51:41 -07:00
|
|
|
wxStaticText* label_name, *label_notes, *label_creator;
|
|
|
|
wxTextCtrl* textctrl_notes;
|
|
|
|
wxListBox* listbox_codes;
|
2010-07-21 19:48:48 -06:00
|
|
|
} m_infobox;
|
2013-04-29 10:00:23 -06:00
|
|
|
wxButton* btn_download;
|
2010-07-21 19:48:48 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|