mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user