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

mp::wait Class Reference

#include <multiplayer_wait.hpp>

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

List of all members.

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_stateget_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_

Detailed Description

Definition at line 28 of file multiplayer_wait.hpp.


Constructor & Destructor Documentation

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().

Here is the call graph for this function:


Member Function Documentation

void mp::wait::generate_menu (  )  [private]
const game_state & mp::wait::get_state (  ) 

Definition at line 337 of file multiplayer_wait.cpp.

References state_.

Referenced by enter_wait_mode().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

void mp::wait::join_game ( bool  observe  ) 
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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.

Todo:
We should catch config::error and then leave the game.

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().

Here is the call graph for this function:

void mp::wait::start_game (  ) 

Todo:
Instead of using level_to_gamestate reinit the state_, this needs more testing -- Mordante It seems level_to_gamestate is needed for the start of game download, but downloads of later scenarios miss certain info and add a players section. Use players to decide between old and new way. (Of course it would be nice to unify the data stored.)

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 72 of file multiplayer_wait.hpp.

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

Definition at line 74 of file multiplayer_wait.hpp.

Referenced by generate_menu(), hide_children(), layout_children(), and wait().

Definition at line 78 of file multiplayer_wait.hpp.

Referenced by generate_menu(), join_game(), process_network_data(), and start_game().

Definition at line 73 of file multiplayer_wait.hpp.

Referenced by layout_children().

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().


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:56 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs