2013-04-17 21:43:35 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <vector>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/event.h>
|
|
|
|
#include <wx/gdicmn.h>
|
|
|
|
#include <wx/string.h>
|
|
|
|
#include <wx/translation.h>
|
|
|
|
#include <wx/windowid.h>
|
2014-02-17 03:18:15 -07:00
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
#include "Core/PatchEngine.h"
|
|
|
|
|
|
|
|
class wxButton;
|
|
|
|
class wxRadioBox;
|
|
|
|
class wxSpinButton;
|
|
|
|
class wxSpinEvent;
|
|
|
|
class wxStaticBoxSizer;
|
|
|
|
class wxTextCtrl;
|
|
|
|
class wxWindow;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
class CPatchAddEdit : public wxDialog
|
|
|
|
{
|
2014-11-08 17:26:20 -07:00
|
|
|
public:
|
|
|
|
CPatchAddEdit(int _selection, wxWindow* parent,
|
2014-12-01 20:56:18 -07:00
|
|
|
wxWindowID id = wxID_ANY,
|
2014-11-08 17:26:20 -07:00
|
|
|
const wxString& title = _("Edit Patch"),
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE);
|
|
|
|
virtual ~CPatchAddEdit();
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxTextCtrl* EditPatchName;
|
|
|
|
wxTextCtrl* EditPatchOffset;
|
|
|
|
wxRadioBox* EditPatchType;
|
|
|
|
wxTextCtrl* EditPatchValue;
|
|
|
|
wxSpinButton* EntrySelection;
|
|
|
|
wxButton* EntryAdd;
|
|
|
|
wxButton* EntryRemove;
|
|
|
|
wxStaticBoxSizer* sbEntry;
|
|
|
|
|
|
|
|
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-07 21:46:09 -07:00
|
|
|
};
|