Changed AR Code Window and Patch Window
Text fields no longer have redundant text. Blank text variables no longer have redundant translation syntax. Removed redundant else condition. Fixed bug with cheat name deleting itself on edit.
This commit is contained in:
parent
a4a8162fb5
commit
57f7129295
|
@ -30,7 +30,7 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, std::vector<ActionReplay::ARCode>
|
|||
Bind(wxEVT_BUTTON, &CARCodeAddEdit::SaveCheatData, this, wxID_OK);
|
||||
|
||||
ActionReplay::ARCode tempEntries;
|
||||
wxString currentName = _("Insert name here...");
|
||||
wxString currentName;
|
||||
|
||||
if (selection == wxNOT_FOUND)
|
||||
{
|
||||
|
@ -47,6 +47,8 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, std::vector<ActionReplay::ARCode>
|
|||
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
|
||||
|
||||
wxStaticText* EditCheatNameText = new wxStaticText(this, wxID_ANY, _("Name:"));
|
||||
wxStaticText* EditCheatCodeText = new wxStaticText(this, wxID_ANY, _("Code:"));
|
||||
|
||||
EditCheatName = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
|
||||
EditCheatName->SetValue(currentName);
|
||||
|
||||
|
@ -56,12 +58,14 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, std::vector<ActionReplay::ARCode>
|
|||
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);
|
||||
sgEntry->Add(EditCheatCodeText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 5);
|
||||
sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5);
|
||||
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND | wxALL, 5);
|
||||
sgEntry->Add(EditCheatCode, wxGBPosition(1, 0), wxGBSpan(1, 2), wxEXPAND | wxALL, 5);
|
||||
sgEntry->Add(EditCheatCode, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5);
|
||||
sgEntry->AddGrowableCol(1);
|
||||
sgEntry->AddGrowableRow(1);
|
||||
sbEntry->Add(sgEntry, 1, wxEXPAND | wxALL);
|
||||
|
@ -176,8 +180,5 @@ void CARCodeAddEdit::UpdateTextCtrl(ActionReplay::ARCode arCode)
|
|||
for (auto& op : arCode.ops)
|
||||
EditCheatCode->AppendText(wxString::Format("%08X %08X\n", op.cmd_addr, op.value));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditCheatCode->SetValue(_("Insert Encrypted or Decrypted code here..."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue