dolphin/Source/Core/DolphinWX/Src/GeckoCodeDiag.h
John Peterson 8dbe236606 Fixing or disabling the "Download Codes (WiiRD Database)" button problem
The "Download Codes (WiiRD Database)" button is enabled (and its click return silently without an effect) when "Tools → Cheats Manager" is opened when there's a running emulation for which there's no "[Gecko]" ini section, confusing the user about the reason for not downloading codes or showing an error when there's no running emulation

Solution

when there's a running emulation: fix the button

when there's no running emulation: disable the button (to indicate to the user that this button must be clicked elsewhere, in the ISO settings dialog, the user will realise or remember)
2013-04-29 12:00:23 -04:00

55 lines
995 B
C++

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef __GECKOCODEDIAG_h__
#define __GECKOCODEDIAG_h__
#include "GeckoCode.h"
#include "GeckoCodeConfig.h"
#include "wx/wx.h"
namespace Gecko
{
class CodeConfigPanel : public wxPanel
{
public:
CodeConfigPanel(wxWindow* const parent);
void LoadCodes(const IniFile& inifile, const std::string& gameid = "");
const std::vector<GeckoCode>& GetCodes() const { return m_gcodes; }
protected:
void UpdateInfoBox(wxCommandEvent&);
void ToggleCode(wxCommandEvent& evt);
void DownloadCodes(wxCommandEvent&);
//void ApplyChanges(wxCommandEvent&);
void UpdateCodeList();
private:
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;
};
}
#endif