2014-10-18 21:32:50 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2014-10-18 21:32:50 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <wx/arrstr.h>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/panel.h>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
#include "Common/IniFile.h"
|
|
|
|
|
|
|
|
class wxButton;
|
|
|
|
class wxCheckBox;
|
|
|
|
class wxNotebook;
|
|
|
|
class wxTextCtrl;
|
|
|
|
|
|
|
|
namespace Gecko
|
|
|
|
{
|
2016-06-24 08:43:46 +00:00
|
|
|
class CodeConfigPanel;
|
2014-10-18 21:32:50 +00:00
|
|
|
}
|
2016-07-23 01:05:04 +00:00
|
|
|
class ActionReplayCodesPanel;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-04-22 10:42:16 +00:00
|
|
|
wxDECLARE_EVENT(DOLPHIN_EVT_ADD_NEW_ACTION_REPLAY_CODE, wxCommandEvent);
|
|
|
|
|
2014-10-18 21:32:50 +00:00
|
|
|
class wxCheatsWindow final : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
wxCheatsWindow(wxWindow* const parent);
|
|
|
|
~wxCheatsWindow();
|
|
|
|
void UpdateGUI();
|
2014-10-18 21:32:50 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
struct CodeData;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// --- GUI Controls ---
|
|
|
|
wxButton* m_button_apply;
|
|
|
|
wxNotebook* m_notebook_main;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
wxPanel* m_tab_log;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
wxCheckBox* m_checkbox_log_ar;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
wxTextCtrl* m_textctrl_log;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-07-23 01:05:04 +00:00
|
|
|
ActionReplayCodesPanel* m_ar_codes_panel;
|
2016-06-24 08:43:46 +00:00
|
|
|
Gecko::CodeConfigPanel* m_geckocode_panel;
|
|
|
|
IniFile m_gameini_default;
|
|
|
|
IniFile m_gameini_local;
|
|
|
|
std::string m_gameini_local_path;
|
|
|
|
std::string m_game_id;
|
|
|
|
u32 m_game_revision;
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
bool m_ignore_ini_callback = false;
|
2016-04-19 21:19:31 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void Init_ChildControls();
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void Load_ARCodes();
|
|
|
|
void Load_GeckoCodes();
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// --- Wx Events Handlers ---
|
|
|
|
// Cheat Search
|
|
|
|
void OnNewARCodeCreated(wxCommandEvent& ev);
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// Close Button
|
|
|
|
void OnEvent_ButtonClose_Press(wxCommandEvent& event);
|
|
|
|
void OnEvent_Close(wxCloseEvent& ev);
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-07-23 01:05:04 +00:00
|
|
|
// Changes to the INI (affects cheat listings)
|
|
|
|
void OnLocalGameIniModified(wxCommandEvent& event);
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// Apply Changes Button
|
|
|
|
void OnEvent_ApplyChanges_Press(wxCommandEvent& event);
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// Update Log Button
|
|
|
|
void OnEvent_ButtonUpdateLog_Press(wxCommandEvent& event);
|
|
|
|
void OnClearActionReplayLog(wxCommandEvent& event);
|
2014-10-18 21:32:50 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
// Enable Logging Checkbox
|
|
|
|
void OnEvent_CheckBoxEnableLogging_StateChange(wxCommandEvent& event);
|
2014-10-18 21:32:50 +00:00
|
|
|
};
|