Skip to content

Commit

Permalink
GUI2/Title Screen: removed window argument from button_callback_multi…
Browse files Browse the repository at this point in the history
…player
  • Loading branch information
Vultraz committed Jan 7, 2021
1 parent bc36c7e commit 1412fa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/gui/dialogs/title_screen.cpp
Expand Up @@ -333,7 +333,7 @@ void title_screen::pre_show(window& win)
// Multiplayer
//
register_button(win, "multiplayer", hotkey::TITLE_SCREEN__MULTIPLAYER,
std::bind(&title_screen::button_callback_multiplayer, this, std::ref(win)));
std::bind(&title_screen::button_callback_multiplayer, this));

//
// Load game
Expand Down Expand Up @@ -486,7 +486,7 @@ void title_screen::hotkey_callback_select_tests()
}
}

void title_screen::button_callback_multiplayer(window& window)
void title_screen::button_callback_multiplayer()
{
while(true) {
gui2::dialogs::mp_method_selection dlg;
Expand All @@ -507,18 +507,18 @@ void title_screen::button_callback_multiplayer(window& window)
switch(res) {
case decltype(dlg)::choice::JOIN:
game_.select_mp_server(preferences::builtin_servers_list().front().address);
window.set_retval(MP_CONNECT);
get_window()->set_retval(MP_CONNECT);
break;
case decltype(dlg)::choice::CONNECT:
game_.select_mp_server("");
window.set_retval(MP_CONNECT);
get_window()->set_retval(MP_CONNECT);
break;
case decltype(dlg)::choice::HOST:
game_.select_mp_server("localhost");
window.set_retval(MP_HOST);
get_window()->set_retval(MP_HOST);
break;
case decltype(dlg)::choice::LOCAL:
window.set_retval(MP_LOCAL);
get_window()->set_retval(MP_LOCAL);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/title_screen.hpp
Expand Up @@ -89,7 +89,7 @@ class title_screen : public modal_dialog

void hotkey_callback_select_tests();

void button_callback_multiplayer(window& window);
void button_callback_multiplayer();

void button_callback_cores();

Expand Down

0 comments on commit 1412fa5

Please sign in to comment.