mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinWX: Kill off trivial event tables
Also fixes some of the wonky stuff in Main where we would fire an event to do post-init stuff which isn't necessary anymore.
This commit is contained in:
@ -29,15 +29,12 @@
|
||||
#include "DolphinWX/ISOProperties.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(CARCodeAddEdit, wxDialog)
|
||||
EVT_BUTTON(wxID_OK, CARCodeAddEdit::SaveCheatData)
|
||||
EVT_SPIN(ID_ENTRY_SELECT, CARCodeAddEdit::ChangeEntry)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
, selection(_selection)
|
||||
{
|
||||
Bind(wxEVT_BUTTON, &CARCodeAddEdit::SaveCheatData, this);
|
||||
|
||||
ActionReplay::ARCode tempEntries;
|
||||
wxString currentName = _("Insert name here..");
|
||||
|
||||
@ -55,13 +52,16 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id,
|
||||
wxStaticBoxSizer* sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, _("Cheat Code"));
|
||||
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
|
||||
|
||||
wxStaticText* EditCheatNameText = new wxStaticText(this, ID_EDITCHEAT_NAME_TEXT, _("Name:"));
|
||||
EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString);
|
||||
wxStaticText* EditCheatNameText = new wxStaticText(this, wxID_ANY, _("Name:"));
|
||||
EditCheatName = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
|
||||
EditCheatName->SetValue(currentName);
|
||||
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT);
|
||||
|
||||
EntrySelection = new wxSpinButton(this);
|
||||
EntrySelection->SetRange(1, ((int)arCodes.size()) > 0 ? (int)arCodes.size() : 1);
|
||||
EntrySelection->SetValue((int)(arCodes.size() - selection));
|
||||
EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE);
|
||||
EntrySelection->Bind(wxEVT_SPIN, &CARCodeAddEdit::ChangeEntry, this);
|
||||
|
||||
EditCheatCode = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE);
|
||||
UpdateTextCtrl(tempEntries);
|
||||
|
||||
sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5);
|
||||
|
Reference in New Issue
Block a user