Skip to content

Commit

Permalink
Sort vehicle spawn list by translated name
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytheway committed Apr 25, 2020
1 parent 7a6b2c8 commit bdd6e24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/debug_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,16 +1235,16 @@ void debug()
if( elem == vproto_id( "custom" ) ) {
continue;
}
veh_strings.emplace_back( elem->name, elem );
veh_strings.emplace_back( _( elem->name ), elem );
}
std::sort( veh_strings.begin(), veh_strings.end() );
std::sort( veh_strings.begin(), veh_strings.end(), localized_compare );
uilist veh_menu;
veh_menu.text = _( "Choose vehicle to spawn" );
int menu_ind = 0;
for( auto &elem : veh_strings ) {
//~ Menu entry in vehicle wish menu: 1st string: displayed name, 2nd string: internal name of vehicle
veh_menu.addentry( menu_ind, true, MENU_AUTOASSIGN, _( "%1$s (%2$s)" ),
_( elem.first ), elem.second.c_str() );
elem.first, elem.second.c_str() );
++menu_ind;
}
veh_menu.query();
Expand Down

0 comments on commit bdd6e24

Please sign in to comment.