mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Changed the way the iterator is used in PatchAddEdit, I thought I'd submit it since it makes for shorter code.
Also a couple of bugfixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1755 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
22753f9e3c
commit
09b3d2d227
4 changed files with 45 additions and 47 deletions
|
@ -45,8 +45,8 @@ void CARCodeAddEdit::CreateGUIControls(int _selection)
|
|||
EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
|
||||
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
|
||||
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
|
||||
EntrySelection->SetRange((int)arCodes.size()-1, 0);
|
||||
EntrySelection->SetValue(_selection);
|
||||
EntrySelection->SetRange(0, (int)arCodes.size()-1);
|
||||
EntrySelection->SetValue((int)arCodes.size()-1 - _selection);
|
||||
EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
UpdateTextCtrl(currentCode);
|
||||
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
|
||||
|
@ -76,7 +76,7 @@ void CARCodeAddEdit::OnClose(wxCloseEvent& WXUNUSED (event))
|
|||
|
||||
void CARCodeAddEdit::ChangeEntry(wxSpinEvent& event)
|
||||
{
|
||||
ActionReplay::ARCode currentCode = arCodes.at(event.GetPosition());
|
||||
ActionReplay::ARCode currentCode = arCodes.at((int)arCodes.size()-1 - event.GetPosition());
|
||||
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
|
||||
UpdateTextCtrl(currentCode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue