CheatSearchTab: Make cheat list display in monospace font

This commit is contained in:
Lioncash 2014-10-25 21:44:56 -04:00
parent 5f21683343
commit adf6ce076c
1 changed files with 7 additions and 2 deletions

View File

@ -45,8 +45,13 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent)
std::array<wxString, 3> data_size_names = {{ _("8-bit"), _("16-bit"), _("32-bit") }}; std::array<wxString, 3> data_size_names = {{ _("8-bit"), _("16-bit"), _("32-bit") }};
m_data_sizes = new wxRadioBox(this, wxID_ANY, _("Data Size"), wxDefaultPosition, wxDefaultSize, static_cast<int>(data_size_names.size()), data_size_names.data()); m_data_sizes = new wxRadioBox(this, wxID_ANY, _("Data Size"), wxDefaultPosition, wxDefaultSize, static_cast<int>(data_size_names.size()), data_size_names.data());
// result controls // Listbox for search results (shown in monospace font).
m_lbox_search_results = new wxListBox(this, -1); m_lbox_search_results = new wxListBox(this, -1);
wxFont list_font = m_lbox_search_results->GetFont();
list_font.SetFamily(wxFONTFAMILY_TELETYPE);
m_lbox_search_results->SetFont(list_font);
// Result count
m_label_results_count = new wxStaticText(this, -1, _("Count:")); m_label_results_count = new wxStaticText(this, -1, _("Count:"));
// create AR code button // create AR code button
@ -286,7 +291,7 @@ void CheatSearchTab::UpdateCheatSearchResultsList()
// #elseif BIG_ENDIAN // #elseif BIG_ENDIAN
// need to do some stuff in here (for 8 and 16bit) for bigendian // need to do some stuff in here (for 8 and 16bit) for bigendian
// #endif // #endif
std::string rowfmt = StringFromFormat("0x%%08x 0x%%0%ux %%u/%%i", m_search_type_size*2); std::string rowfmt = StringFromFormat("0x%%08X 0x%%0%uX %%u/%%i", m_search_type_size*2);
m_lbox_search_results->Append( m_lbox_search_results->Append(
wxString::Format(rowfmt.c_str(), result.address, display_value, display_value, display_value)); wxString::Format(rowfmt.c_str(), result.address, display_value, display_value, display_value));