2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:43:35 +00:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <wx/dialog.h>
|
2014-02-17 10:18:15 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include "Core/PatchEngine.h"
|
|
|
|
|
|
|
|
class wxButton;
|
|
|
|
class wxRadioBox;
|
|
|
|
class wxSpinButton;
|
|
|
|
class wxSpinEvent;
|
|
|
|
class wxStaticBoxSizer;
|
|
|
|
class wxTextCtrl;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
class CPatchAddEdit : public wxDialog
|
|
|
|
{
|
2014-11-09 00:26:20 +00:00
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
CPatchAddEdit(int _selection, std::vector<PatchEngine::Patch>* _onFrame, wxWindow* parent,
|
|
|
|
wxWindowID id = wxID_ANY, const wxString& title = _("Edit Patch"),
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE);
|
|
|
|
virtual ~CPatchAddEdit();
|
2014-11-09 00:26:20 +00:00
|
|
|
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
wxTextCtrl* EditPatchName;
|
|
|
|
wxTextCtrl* EditPatchOffset;
|
|
|
|
wxRadioBox* EditPatchType;
|
|
|
|
wxTextCtrl* EditPatchValue;
|
|
|
|
wxSpinButton* EntrySelection;
|
|
|
|
wxButton* EntryAdd;
|
|
|
|
wxButton* EntryRemove;
|
|
|
|
wxStaticBoxSizer* sbEntry;
|
|
|
|
std::vector<PatchEngine::Patch>* onFrame;
|
|
|
|
|
|
|
|
void CreateGUIControls(int selection);
|
|
|
|
void ChangeEntry(wxSpinEvent& event);
|
|
|
|
void SavePatchData(wxCommandEvent& event);
|
|
|
|
void AddEntry(wxCommandEvent& event);
|
|
|
|
void RemoveEntry(wxCommandEvent& event);
|
|
|
|
void UpdateEntryCtrls(PatchEngine::PatchEntry pE);
|
|
|
|
bool UpdateTempEntryData(std::vector<PatchEngine::PatchEntry>::iterator iterEntry);
|
|
|
|
|
|
|
|
int selection, currentItem;
|
|
|
|
std::vector<PatchEngine::PatchEntry> tempEntries;
|
|
|
|
std::vector<PatchEngine::PatchEntry>::iterator itCurEntry;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|