Skip to content

Commit

Permalink
MP Lobby: start with keyboard focus on chat, not the game list
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Feb 12, 2018
1 parent 7c29cbe commit ca06517
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/dialogs/multiplayer/lobby.cpp
Expand Up @@ -727,10 +727,7 @@ void mp_lobby::pre_show(window& window)
connect_signal_notify_modified(*gamelistbox_,
std::bind(&mp_lobby::gamelist_change_callback, this));

window.keyboard_capture(gamelistbox_);

player_list_.init(window);

player_list_.sort_by_name->set_value(preferences::playerlist_sort_name());
player_list_.sort_by_relation->set_value(preferences::playerlist_sort_relation());
player_list_.update_sort_icons();
Expand All @@ -747,6 +744,9 @@ void mp_lobby::pre_show(window& window)
window.set_exit_hook(std::bind(&mp_lobby::exit_hook, this, std::ref(window)));

chatbox_ = find_widget<chatbox>(&window, "chat", false, true);

window.keyboard_capture(chatbox_);

chatbox_->set_lobby_info(lobby_info_);
chatbox_->set_wesnothd_connection(network_connection_);
chatbox_->set_active_window_changed_callback([this]() { player_list_dirty_ = true; });
Expand Down

3 comments on commit ca06517

@ProditorMagnus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that keep 1.12 behavior that letters go to chat, but up/down arrow work on gamelist?

@Vultraz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. All to chat.

@ProditorMagnus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will create issue for lobby chat problems after release.

Please sign in to comment.