mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 07:20:54 +00:00
MP Staging: some basic userlist handling
This commit is contained in:
parent
e54d8fe832
commit
c1ca0e360e
@ -236,11 +236,26 @@ void tmp_staging::pre_show(twindow& window)
|
||||
//
|
||||
// Initialize chatbox and game rooms
|
||||
//
|
||||
|
||||
tchatbox& chat = find_widget<tchatbox>(&window, "chat", false);
|
||||
|
||||
chat.set_lobby_info(lobby_info_);
|
||||
chat.room_window_open("this game", true); // TODO: better title?
|
||||
chat.active_window_changed();
|
||||
|
||||
//
|
||||
// Set up player list
|
||||
//
|
||||
tlistbox& player_list = find_widget<tlistbox>(&window, "player_list", false);
|
||||
|
||||
for(const auto& player : connect_engine_.connected_users()) {
|
||||
std::map<std::string, string_map> data;
|
||||
string_map item;
|
||||
|
||||
item["label"] = player;
|
||||
data.emplace("player_name", item);
|
||||
|
||||
player_list.add_row(data);
|
||||
}
|
||||
|
||||
//
|
||||
// Set up the Lua plugin context
|
||||
|
Loading…
x
Reference in New Issue
Block a user