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