Merge pull request #2123 from RachelBryk/nonmodal-isoprops

Make iso properties non modal.
This commit is contained in:
skidau
2015-02-27 13:25:46 +11:00
13 changed files with 69 additions and 45 deletions

View File

@ -19,6 +19,7 @@
#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "Common/StringUtil.h"
#include "Core/ActionReplay.h"
#include "Core/HW/Memmap.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/Cheats/CheatSearchTab.h"
@ -308,7 +309,7 @@ void CheatSearchTab::CreateARCode(wxCommandEvent&)
{
const u32 address = m_search_results[sel].address | ((m_search_type_size & ~1) << 24);
CreateCodeDialog arcode_dlg(this, address);
CreateCodeDialog arcode_dlg(this, address, ActionReplay::GetARCodes());
arcode_dlg.SetExtraStyle(arcode_dlg.GetExtraStyle() & ~wxWS_EX_BLOCK_EVENTS);
arcode_dlg.ShowModal();
}

View File

@ -20,9 +20,10 @@
// Fired when an ActionReplay code is created.
wxDEFINE_EVENT(UPDATE_CHEAT_LIST_EVENT, wxCommandEvent);
CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address)
CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address, const std::vector<ActionReplay::ARCode>& _arCodes)
: wxDialog(parent, wxID_ANY, _("Create AR Code"))
, m_code_address(address)
, arCodes(_arCodes)
{
wxStaticText* const label_name = new wxStaticText(this, wxID_ANY, _("Name: "));
m_textctrl_name = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(256, -1));

View File

@ -8,6 +8,7 @@
#include <wx/event.h>
#include "Common/CommonTypes.h"
#include "Core/ActionReplay.h"
class wxCheckBox;
class wxTextCtrl;
@ -18,10 +19,11 @@ wxDECLARE_EVENT(UPDATE_CHEAT_LIST_EVENT, wxCommandEvent);
class CreateCodeDialog final : public wxDialog
{
public:
CreateCodeDialog(wxWindow* const parent, const u32 address);
CreateCodeDialog(wxWindow* const parent, const u32 address, const std::vector<ActionReplay::ARCode>& _arCodes);
private:
const u32 m_code_address;
std::vector<ActionReplay::ARCode> arCodes;
wxTextCtrl* m_textctrl_name;
wxTextCtrl* m_textctrl_code;