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


Detailed Description

Definition at line 46 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 67 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 ( )
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 87 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 52 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 51 of file lobby.hpp.

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