Skip to content

Commit

Permalink
Add hotkeys for world interaction (#59542)
Browse files Browse the repository at this point in the history
Seetings, mods, and template are arbitrary, it's just the lack of delete
and reset that were annoying me.
  • Loading branch information
anothersimulacrum authored Jul 24, 2022
1 parent eb4bede commit b7142b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,9 +1026,11 @@ void main_menu::world_tab( const std::string &worldname )
uilist mmenu( string_format( _( "Manage world \"%s\"" ), worldname ), {} );
mmenu.border_color = c_white;
int opt_val = 0;
std::array<char, 5> hotkeys = { 'd', 'r', 'm', 's', 't' };
for( const std::string &it : vWorldSubItems ) {
mmenu.entries.emplace_back( opt_val++, true, MENU_AUTOASSIGN,
mmenu.entries.emplace_back( opt_val, true, hotkeys[opt_val],
remove_color_tags( shortcut_text( c_white, it ) ) );
++opt_val;
}
mmenu.entries.emplace_back( opt_val, true, 'q', _( "<- Back to Main Menu" ), c_yellow, c_yellow );
mmenu.query();
Expand Down

0 comments on commit b7142b2

Please sign in to comment.