#include <multiplayer_wait.hpp>


Classes | |
| class | leader_preview_pane |
Public Member Functions | |
| wait (game_display &disp, const config &cfg, chat &c, config &gamelist) | |
| virtual void | process_event () |
| void | join_game (bool observe) |
| const game_state & | get_state () |
| void | start_game () |
Protected Member Functions | |
| virtual void | layout_children (const SDL_Rect &rect) |
| Lays the children out. | |
| virtual void | hide_children (bool hide=true) |
| Hides or shows all gui::widget children of this widget. | |
| virtual void | process_network_data (const config &data, const network::connection sock) |
| Processes any pending network data. | |
Private Member Functions | |
| void | generate_menu () |
Private Attributes | |
| gui::button | cancel_button_ |
| gui::label | start_label_ |
| gui::menu | game_menu_ |
| config | level_ |
| game_state | state_ |
| bool | stop_updates_ |
Definition at line 28 of file multiplayer_wait.hpp.
| mp::wait::wait | ( | game_display & | disp, | |
| const config & | cfg, | |||
| mp::chat & | c, | |||
| config & | gamelist | |||
| ) |
Definition at line 176 of file multiplayer_wait.cpp.
References game_menu_, mp::ui::gamelist_updated(), and gui::menu::set_numeric_keypress_selection().

| void mp::wait::generate_menu | ( | ) | [private] |
Definition at line 436 of file multiplayer_wait.cpp.
References _, _n, config::child_range(), game_config::color_info(), COLUMN_SEPARATOR, unit_type_data::find(), unit_type::flag_rgb(), t_string::from_serialized(), game_menu_, mp::ui::gamelist(), mp::get_color_string(), unit_type::get_gender_unit_type(), font::IMAGE, unit_type::image(), IMAGE_PREFIX, color_range::index(), level_, leader_list_manager::random_enemy_picture, gui::menu::set_items(), mp::ui::set_user_list(), t_string::size(), stop_updates_, t_string::str(), unit_type::type_name(), and unit_types.
Referenced by join_game(), and process_network_data().


| const game_state & mp::wait::get_state | ( | ) |
Definition at line 337 of file multiplayer_wait.cpp.
References state_.
Referenced by enter_wait_mode().

| void mp::wait::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 393 of file multiplayer_wait.cpp.
References cancel_button_, game_menu_, gui::scrollarea::hide(), and gui::widget::hide().

| void mp::wait::join_game | ( | bool | observe | ) |
Definition at line 196 of file multiplayer_wait.cpp.
References _, mp::ui::append_to_title(), mp::check_response(), config::child(), config::child_range(), game_config::color_info(), COLUMN_SEPARATOR, mp::ui::disp(), preferences::era(), error(), mp::find_suitable_faction(), generate_menu(), mp::wait::leader_preview_pane::get_selected_gender(), mp::wait::leader_preview_pane::get_selected_leader(), config::has_attribute(), IMAGE_PREFIX, color_range::index(), level_, preferences::login(), dialogs::network_receive_dialog(), gui::OK_CANCEL, mp::ui::QUIT, network::send_data(), mp::ui::set_result(), and gui::show_dialog().
Referenced by enter_wait_mode().


| void mp::wait::layout_children | ( | const SDL_Rect & | rect | ) | [protected, virtual] |
Lays the children out.
This method is to be overridden by the subclasses of the mp_ui class; it will be called.
Reimplemented from mp::ui.
Definition at line 377 of file multiplayer_wait.cpp.
References gui::ButtonVPadding, cancel_button_, mp::ui::client_area(), game_menu_, gui::widget::height(), gui::widget::set_location(), gui::menu::set_max_height(), gui::menu::set_max_width(), gui::widget::set_measurements(), start_label_, mp::ui::title(), and gui::widget::width().

| void mp::wait::process_event | ( | ) | [virtual] |
Reimplemented from mp::ui.
Definition at line 190 of file multiplayer_wait.cpp.
References cancel_button_, gui::button::pressed(), mp::ui::QUIT, and mp::ui::set_result().

| void mp::wait::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 401 of file multiplayer_wait.cpp.
References _, config::apply_diff(), config::child(), config::child_count(), mp::ui::disp(), generate_menu(), level_, LOG_NW, mp::ui::PLAY, mp::ui::QUIT, mp::ui::set_result(), gui2::show_transient_message(), stop_updates_, and gui::widget::video().

| void mp::wait::start_game | ( | ) |
Definition at line 342 of file multiplayer_wait.cpp.
References config::child(), game_state::classification(), DBG_NW, statistics::fresh_stats(), level_, mp::level_to_gamestate(), LOG_NW, statistics::read_stats(), game_classification::scenario, and state_.
Referenced by enter_wait_mode().


gui::button mp::wait::cancel_button_ [private] |
Definition at line 72 of file multiplayer_wait.hpp.
Referenced by hide_children(), layout_children(), and process_event().
gui::menu mp::wait::game_menu_ [private] |
Definition at line 74 of file multiplayer_wait.hpp.
Referenced by generate_menu(), hide_children(), layout_children(), and wait().
config mp::wait::level_ [private] |
Definition at line 78 of file multiplayer_wait.hpp.
Referenced by generate_menu(), join_game(), process_network_data(), and start_game().
gui::label mp::wait::start_label_ [private] |
Definition at line 73 of file multiplayer_wait.hpp.
Referenced by layout_children().
game_state mp::wait::state_ [private] |
Definition at line 79 of file multiplayer_wait.hpp.
Referenced by get_state(), and start_game().
bool mp::wait::stop_updates_ [private] |
Definition at line 81 of file multiplayer_wait.hpp.
Referenced by generate_menu(), and process_network_data().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:56 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |