2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
#ifndef __PATCH_ADDEDIT_h__
|
|
|
|
#define __PATCH_ADDEDIT_h__
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/spinctrl.h>
|
|
|
|
#include "ISOProperties.h"
|
|
|
|
|
|
|
|
class CPatchAddEdit : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
2008-12-17 04:14:24 +00:00
|
|
|
CPatchAddEdit(int _selection, wxWindow* parent,
|
|
|
|
wxWindowID id = 1,
|
2011-01-05 04:35:46 +00:00
|
|
|
const wxString& title = _("Edit Patch"),
|
2008-12-17 04:14:24 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2009-01-03 21:55:49 +00:00
|
|
|
const wxSize& size = wxDefaultSize,
|
2008-12-17 04:14:24 +00:00
|
|
|
long style = wxDEFAULT_DIALOG_STYLE);
|
2008-12-08 04:46:09 +00:00
|
|
|
virtual ~CPatchAddEdit();
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
|
|
|
|
wxTextCtrl *EditPatchName;
|
|
|
|
wxTextCtrl *EditPatchOffset;
|
|
|
|
wxRadioBox *EditPatchType;
|
|
|
|
wxTextCtrl *EditPatchValue;
|
|
|
|
wxSpinButton *EntrySelection;
|
2009-01-03 21:55:49 +00:00
|
|
|
wxButton *EntryRemove;
|
2009-02-20 00:07:35 +00:00
|
|
|
wxStaticBoxSizer* sbEntry;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
ID_EDITPATCH_NAME_TEXT = 4500,
|
|
|
|
ID_EDITPATCH_NAME,
|
|
|
|
ID_EDITPATCH_OFFSET_TEXT,
|
|
|
|
ID_EDITPATCH_OFFSET,
|
|
|
|
ID_ENTRY_SELECT,
|
|
|
|
ID_EDITPATCH_TYPE,
|
|
|
|
ID_EDITPATCH_VALUE_TEXT,
|
2009-01-03 21:55:49 +00:00
|
|
|
ID_EDITPATCH_VALUE,
|
|
|
|
ID_ENTRY_ADD,
|
|
|
|
ID_ENTRY_REMOVE
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void CreateGUIControls(int selection);
|
|
|
|
void ChangeEntry(wxSpinEvent& event);
|
2009-01-03 21:55:49 +00:00
|
|
|
void SavePatchData(wxCommandEvent& event);
|
|
|
|
void AddRemoveEntry(wxCommandEvent& event);
|
|
|
|
void UpdateEntryCtrls(PatchEngine::PatchEntry pE);
|
2011-07-09 21:00:30 +00:00
|
|
|
bool UpdateTempEntryData(std::vector<PatchEngine::PatchEntry>::iterator iterEntry);
|
2009-01-03 23:02:13 +00:00
|
|
|
|
2009-02-20 00:07:35 +00:00
|
|
|
int selection, currentItem;
|
2009-01-03 21:55:49 +00:00
|
|
|
std::vector<PatchEngine::PatchEntry> tempEntries;
|
2009-01-03 23:02:13 +00:00
|
|
|
std::vector<PatchEngine::PatchEntry>::iterator itCurEntry;
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
#endif // __PATCH_ADDEDIT_h__
|