Classes | Public Member Functions | Protected Member Functions | Private Attributes

mp::lobby Class Reference

#include <multiplayer_lobby.hpp>

Inheritance diagram for mp::lobby:
Inheritance graph
[legend]
Collaboration diagram for mp::lobby:
Collaboration graph
[legend]

List of all members.

Classes

class  lobby_sorter

Public Member Functions

 lobby (game_display &d, const config &cfg, chat &c, config &gamelist)
virtual void process_event ()

Protected Member Functions

virtual void hide_children (bool hide=true)
 Hides or shows all gui::widget children of this widget.
virtual void layout_children (const SDL_Rect &rect)
 Lays the children out.
virtual void process_network_data (const config &data, const network::connection sock)
 Processes any pending network data.
virtual void gamelist_updated (bool silent=true)
 Called each time the gamelist_ variable is updated.

Private Attributes

std::vector< bool > game_vacant_slots_
std::vector< bool > game_observers_
gui::button observe_game_
gui::button join_game_
gui::button create_game_
gui::button skip_replay_
gui::button game_preferences_
gui::button quit_game_
gui::button apply_filter_
gui::button invert_filter_
gui::button vacant_slots_
gui::button friends_in_game_
gui::label filter_label_
gui::textbox filter_text_
int last_selected_game_
lobby_sorter sorter_
gamebrowser games_menu_
std::map< std::string,
std::string > 
minimaps_
std::string search_string_

Detailed Description

Definition at line 140 of file multiplayer_lobby.hpp.


Constructor & Destructor Documentation

mp::lobby::lobby ( game_display d,
const config cfg,
chat c,
config gamelist 
)

Member Function Documentation

void mp::lobby::gamelist_updated ( bool  silent = true  )  [protected, virtual]

Called each time the gamelist_ variable is updated.

May be overridden by child classes to add custom gamelist behaviour.

Reimplemented from mp::ui.

Definition at line 843 of file multiplayer_lobby.cpp.

References config::child(), gui::button::enable(), mp::ui::game_config(), mp::ui::gamelist(), games_menu_, join_game_, observe_game_, mp::gamebrowser::selection_is_joinable(), mp::gamebrowser::selection_is_observable(), and mp::gamebrowser::set_game_items().

Referenced by lobby(), and process_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void mp::lobby::hide_children ( bool  hide = true  )  [protected, virtual]

Hides or shows all gui::widget children of this widget.

Should be overridden by subclasses which add their own children.

Reimplemented from mp::ui.

Definition at line 785 of file multiplayer_lobby.cpp.

References apply_filter_, create_game_, filter_label_, filter_text_, friends_in_game_, game_preferences_, games_menu_, gui::widget::hide(), gui::scrollarea::hide(), invert_filter_, join_game_, observe_game_, quit_game_, skip_replay_, and vacant_slots_.

Here is the call graph for this function:

void mp::lobby::layout_children ( const SDL_Rect &  rect  )  [protected, virtual]
void mp::lobby::process_event (  )  [virtual]

Todo:
I am aware that the box is not grayed out even though it definitely should be. This is because the textbox class currently does not really have an easy way to do that. I'll have to look into this.

Reimplemented from mp::ui.

Definition at line 856 of file multiplayer_lobby.cpp.

References _, config::add_child(), apply_filter_, gui::button::checked(), mp::ui::CREATE, create_game_, mp::gamebrowser::game_item::current_turn, mp::ui::disp_, mp::gamebrowser::empty(), gui::widget::enable(), gui::button::enable(), filter_label_, filter_text_, friends_in_game_, game_preferences_, gamelist_updated(), games_menu_, mp::ui::get_selected_user_game(), mp::gamebrowser::game_item::id, invert_filter_, mp::ui::JOIN, events::handler::join(), join_game_, last_selected_game_, mp::ui::OBSERVE, observe_game_, gui::OK_CANCEL, preferences::prv::password, mp::gamebrowser::game_item::password_required, mp::ui::PREFERENCES, gui::button::pressed(), mp::ui::QUIT, quit_game_, recorder, mp::gamebrowser::reset_selection(), search_string_, mp::gamebrowser::select_game(), game_config::images::selected, mp::gamebrowser::selected(), mp::gamebrowser::selected_game(), mp::ui::selected_user_changed(), mp::gamebrowser::selection(), mp::gamebrowser::selection_is_joinable(), mp::gamebrowser::selection_is_observable(), network::send_data(), gui::textbox::set_editable(), preferences::set_fi_friends_in_game(), preferences::set_fi_invert(), preferences::set_fi_text(), preferences::set_fi_vacant_slots(), preferences::set_filter_lobby(), preferences::set_message_private(), playmp_controller::set_replay_last_turn(), mp::ui::set_result(), mp::ui::set_selected_game(), mp::ui::set_selected_user_changed(), replay::set_skip(), preferences::set_skip_mp_replay(), gui::show_dialog(), skip_replay_, mp::gamebrowser::game_item::started, gui::textbox::text(), and vacant_slots_.

Here is the call graph for this function:

void mp::lobby::process_network_data ( const config data,
const network::connection  sock 
) [protected, virtual]

Processes any pending network data.

Called by the public process_network() method. Overridden by subclasses who add more behaviour for network.

Reimplemented from mp::ui.

Definition at line 980 of file multiplayer_lobby.cpp.

References last_selected_game_.


Member Data Documentation

Definition at line 177 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().

Definition at line 172 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), and process_event().

Definition at line 181 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().

Definition at line 182 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().

Definition at line 180 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().

std::vector<bool> mp::lobby::game_observers_ [private]

Definition at line 168 of file multiplayer_lobby.hpp.

Definition at line 174 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), and process_event().

std::vector<bool> mp::lobby::game_vacant_slots_ [private]

Definition at line 167 of file multiplayer_lobby.hpp.

Definition at line 178 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().

Definition at line 184 of file multiplayer_lobby.hpp.

Referenced by process_event(), and process_network_data().

std::map<std::string,std::string> mp::lobby::minimaps_ [private]

Definition at line 189 of file multiplayer_lobby.hpp.

Definition at line 175 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), and process_event().

std::string mp::lobby::search_string_ [private]

Definition at line 191 of file multiplayer_lobby.hpp.

Referenced by lobby(), and process_event().

Definition at line 173 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().

Definition at line 186 of file multiplayer_lobby.hpp.

Definition at line 179 of file multiplayer_lobby.hpp.

Referenced by hide_children(), layout_children(), lobby(), and process_event().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:51 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs