Repair the sorting of the hotkey list.
This commit is contained in:
parent
50ee046766
commit
5c4694c408
1 changed files with 10 additions and 6 deletions
|
@ -254,7 +254,7 @@ hotkey_preferences_dialog::hotkey_preferences_dialog(display& disp) :
|
|||
game_commands_(),
|
||||
editor_commands_(),
|
||||
title_screen_commands_(),
|
||||
heading_( (formatter() << HEADING_PREFIX << _("Action")
|
||||
heading_( (formatter() << HEADING_PREFIX << COLUMN_SEPARATOR << _("Action")
|
||||
<< COLUMN_SEPARATOR << _("Binding")).str() ),
|
||||
selected_command_(0),
|
||||
general_sorter_(),
|
||||
|
@ -314,10 +314,10 @@ hotkey_preferences_dialog::hotkey_preferences_dialog(display& disp) :
|
|||
disp_.video().clear_all_help_strings();
|
||||
|
||||
// Initialize sorters.
|
||||
general_sorter_.set_alpha_sort(0).set_alpha_sort(1);
|
||||
game_sorter_.set_alpha_sort(0).set_alpha_sort(1);
|
||||
editor_sorter_.set_alpha_sort(0).set_alpha_sort(1);
|
||||
title_screen_sorter_.set_alpha_sort(0).set_alpha_sort(1);
|
||||
general_sorter_.set_alpha_sort(1).set_alpha_sort(2);
|
||||
game_sorter_.set_alpha_sort(1).set_alpha_sort(2);
|
||||
editor_sorter_.set_alpha_sort(1).set_alpha_sort(2);
|
||||
title_screen_sorter_.set_alpha_sort(1).set_alpha_sort(2);
|
||||
|
||||
// Populate every menu_
|
||||
for (int scope = 0; scope != hotkey::SCOPE_COUNT; scope++) {
|
||||
|
@ -325,6 +325,10 @@ hotkey_preferences_dialog::hotkey_preferences_dialog(display& disp) :
|
|||
set_hotkey_menu(false);
|
||||
}
|
||||
|
||||
general_hotkeys_.sort_by(1);
|
||||
game_hotkeys_.sort_by(1);
|
||||
editor_hotkeys_.sort_by(1);
|
||||
title_screen_hotkeys_.sort_by(1);
|
||||
}
|
||||
|
||||
void hotkey_preferences_dialog::set_hotkey_menu(bool keep_viewport) {
|
||||
|
@ -381,7 +385,7 @@ void hotkey_preferences_dialog::set_hotkey_menu(bool keep_viewport) {
|
|||
image_path = "icons/action/" + command + "_25.png~CROP(3,3,18,18)";
|
||||
|
||||
menu_items.push_back(
|
||||
(formatter() << IMAGE_PREFIX << image_path << IMG_TEXT_SEPARATOR
|
||||
(formatter() << IMAGE_PREFIX << image_path << COLUMN_SEPARATOR
|
||||
<< truncated_description
|
||||
<< HELP_STRING_SEPARATOR << description << (tooltip.empty() ? "" : " - ") << tooltip
|
||||
<< COLUMN_SEPARATOR << font::NULL_MARKUP
|
||||
|
|
Loading…
Add table
Reference in a new issue