28 {
"player_type_icon", {{
"label",
"misc/leader-crown.png~CROP(12, 1, 15, 15)"}}},
40 for(
const config& user : users) {
44 const std::string name = user[
"name"];
48 if(user[
"host"].to_bool()) {
49 icon =
"misc/leader-crown.png~CROP(12, 1, 15, 15)";
50 }
else if(user[
"observer"].to_bool()) {
51 icon =
"misc/eye.png";
53 icon =
"lobby/status-lobby-s.png";
55 icon =
"lobby/status-lobby-n.png";
59 data.emplace(
"player_type_icon", item);
62 data.emplace(
"player_name", item);
A config object defines a single node in a WML file, with access to child nodes.
boost::iterator_range< const_child_iterator > const_child_itors
grid & add_row(const widget_item &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
bool select_row(const unsigned row, const bool select=true)
Selects a row.
void clear()
Removes all the rows in the listbox, clearing it.
void update_list(const config::const_child_itors &users)
player_list_helper(window *window)
base class of top level items, the only item which needs to store the final canvases to draw on.
std::map< std::string, widget_item > widget_data
std::map< std::string, t_string > widget_item