The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Public Attributes | List of all members
gui2::dialogs::sub_player_list Struct Reference

#include <lobby.hpp>

Public Member Functions

void init (window &w, const std::string &label, const bool unfolded=false)
 
void update_player_count_label ()
 

Public Attributes

tree_view_nodetree
 
labeltree_label
 
labellabel_player_count
 

Detailed Description

Definition at line 41 of file lobby.hpp.

Member Function Documentation

◆ init()

void gui2::dialogs::sub_player_list::init ( window w,
const std::string &  label,
const bool  unfolded = false 
)

Definition at line 65 of file lobby.cpp.

References gui2::tree_view::add_node(), gui2::tree_view_node::unfold(), and w.

◆ update_player_count_label()

void gui2::dialogs::sub_player_list::update_player_count_label ( )
Todo:
Make sure setting visible resizes the widget.

It doesn't work here since invalidate_layout is blocked, but the widget should also be able to handle it itself. Once done the setting of the label text can also be removed.

Definition at line 85 of file lobby.cpp.

References gui2::tree_view_node::count_children(), label_player_count, gui2::styled_widget::set_label(), and tree.

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

Member Data Documentation

◆ label_player_count

label* gui2::dialogs::sub_player_list::label_player_count

Definition at line 47 of file lobby.hpp.

Referenced by update_player_count_label().

◆ tree

tree_view_node* gui2::dialogs::sub_player_list::tree

◆ tree_label

label* gui2::dialogs::sub_player_list::tree_label

Definition at line 46 of file lobby.hpp.


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