@@ -555,7 +555,7 @@ static void menu_file_replay_map(int param) {
555
555
});
556
556
}
557
557
558
- static void top_menu_file_handle (menu_item &item) {
558
+ void top_menu_file_handle (menu_item &item) {
559
559
if (item.id == " new_game" ) { menu_file_new_game (0 ); }
560
560
else if (item.id == " replay_map" ) { menu_file_replay_map (0 ); }
561
561
else if (item.id == " load_game" ) { menu_file_load_game (0 ); }
@@ -564,45 +564,33 @@ static void top_menu_file_handle(menu_item &item) {
564
564
else if (item.id == " exit_game" ) { menu_file_exit_city (0 ); }
565
565
}
566
566
567
- static void menu_options_sound (int param) {
568
- widget_top_menu_clear_state ();
569
- window_sound_options_show (window_city_show);
570
- }
571
-
572
- static void menu_options_speed (int param) {
573
- widget_top_menu_clear_state ();
574
- window_speed_options_show (window_city_show);
575
- }
576
-
577
- static void menu_options_difficulty (int param) {
578
- widget_top_menu_clear_state ();
579
- window_difficulty_options_show (window_city_show);
580
- }
581
-
582
- static void menu_options_autosave (int param) {
583
- g_settings.toggle_monthly_autosave ();
584
- set_text_for_autosave ();
585
- }
586
-
587
- static void menu_options_change_enh (int param) {
588
- window_config_show ([] {});
589
- }
590
-
591
- static void menu_options_hotkeys (int param) {
592
- window_hotkey_config_show ([] {});
593
- }
594
-
595
567
void top_menu_widget::options_handle (menu_item &item) {
596
568
if (item.id == " display_options" ) {
597
569
widget_top_menu_clear_state ();
598
570
ui::display_options_window::show (window_city_show);
599
571
}
600
- else if (item.id == " sound_options" ) { menu_options_sound (0 ); }
601
- else if (item.id == " speed_options" ) { menu_options_speed (0 ); }
602
- else if (item.id == " difficulty_options" ) { menu_options_difficulty (0 ); }
603
- else if (item.id == " autosave_options" ) { menu_options_autosave (0 ); }
604
- else if (item.id == " hotkeys_options" ) { menu_options_hotkeys (0 ); }
605
- else if (item.id == " enhanced_options" ) { menu_options_change_enh (0 ); }
572
+ else if (item.id == " sound_options" ) {
573
+ widget_top_menu_clear_state ();
574
+ window_sound_options_show (window_city_show);
575
+ }
576
+ else if (item.id == " speed_options" ) {
577
+ widget_top_menu_clear_state ();
578
+ window_speed_options_show (window_city_show);
579
+ }
580
+ else if (item.id == " difficulty_options" ) {
581
+ widget_top_menu_clear_state ();
582
+ window_difficulty_options_show (window_city_show);
583
+ }
584
+ else if (item.id == " autosave_options" ) {
585
+ g_settings.toggle_monthly_autosave ();
586
+ set_text_for_autosave ();
587
+ }
588
+ else if (item.id == " hotkeys_options" ) {
589
+ window_hotkey_config_show ([] {});
590
+ }
591
+ else if (item.id == " enhanced_options" ) {
592
+ window_config_show ([] {});
593
+ }
606
594
}
607
595
608
596
void top_menu_widget::help_handle (menu_item &item) {
0 commit comments