The Battle for Wesnoth  1.17.0-dev
Classes | Public Member Functions | Private Attributes | List of all members
gui2::lobby_player_list_helper Class Reference

#include <lobby_player_list_helper.hpp>

Classes

struct  sub_list
 

Public Member Functions

void init (window &w)
 
void update (std::vector< mp::user_info > &user_info)
 Updates the tree contents based on the given user data. More...
 
 lobby_player_list_helper (decltype(user_callback) ucb)
 

Private Attributes

std::array< sub_list, 3 > player_lists
 Main subsections of the player tree. More...
 
tree_viewtree
 The parent tree. More...
 
std::function< void(mp::user_info *)> user_callback
 The double click callback bound to each player's tree node. More...
 

Detailed Description

Definition at line 34 of file lobby_player_list_helper.hpp.

Constructor & Destructor Documentation

◆ lobby_player_list_helper()

gui2::lobby_player_list_helper::lobby_player_list_helper ( decltype(user_callback ucb)
inline

Definition at line 65 of file lobby_player_list_helper.hpp.

Member Function Documentation

◆ init()

void gui2::lobby_player_list_helper::init ( window w)

Definition at line 168 of file lobby_player_list_helper.cpp.

References _(), player_lists, tree, and w.

Referenced by gui2::dialogs::mp_lobby::pre_show().

◆ update()

void gui2::lobby_player_list_helper::update ( std::vector< mp::user_info > &  user_info)

Member Data Documentation

◆ player_lists

std::array<sub_list, 3> gui2::lobby_player_list_helper::player_lists
private

Main subsections of the player tree.

This should never change at runtime so the number is hardcoded.

Definition at line 56 of file lobby_player_list_helper.hpp.

Referenced by init(), and update().

◆ tree

tree_view* gui2::lobby_player_list_helper::tree
private

The parent tree.

Definition at line 59 of file lobby_player_list_helper.hpp.

Referenced by init(), and update().

◆ user_callback

std::function<void(mp::user_info*)> gui2::lobby_player_list_helper::user_callback
private

The double click callback bound to each player's tree node.

Definition at line 62 of file lobby_player_list_helper.hpp.

Referenced by update().


The documentation for this class was generated from the following files: