Skip to content

Commit c14bb7f

Browse files
committed
ui: top menu options handle moved to class
1 parent 4de3ba3 commit c14bb7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/widget/widget_top_menu_game.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ struct top_menu_widget : autoconfig_window_t<top_menu_widget> {
8484
void sub_menu_init();
8585
void advisors_handle(menu_item &item);
8686
void help_handle(menu_item &item);
87+
void options_handle(menu_item &item);
8788

8889
virtual void load(archive arch, pcstr section) override {
8990
autoconfig_window::load(arch, section);
@@ -591,7 +592,7 @@ static void menu_options_hotkeys(int param) {
591592
window_hotkey_config_show([] {});
592593
}
593594

594-
void top_menu_options_handle(menu_item &item) {
595+
void top_menu_widget::options_handle(menu_item &item) {
595596
if (item.id == "display_options") {
596597
widget_top_menu_clear_state();
597598
ui::display_options_window::show(window_city_show);
@@ -635,7 +636,7 @@ void top_menu_widget::sub_menu_init() {
635636
auto *options = headers["options"].dcast_menu_header();
636637
if (options) {
637638
options->item(0).hidden = system_is_fullscreen_only();
638-
options->onclick(top_menu_options_handle);
639+
options->onclick([this] (auto &h) { options_handle(h); });
639640
}
640641

641642
auto *file = headers["file"].dcast_menu_header();

0 commit comments

Comments
 (0)