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.

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

Protected Member Functions

virtual void layout_children (const SDL_Rect &rect)
virtual void hide_children (bool hide=true)
virtual void process_network_data (const config &data, const network::connection sock)

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_

Classes

class  leader_preview_pane


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 
)


Member Function Documentation

void mp::wait::process_event (  )  [virtual]

Reimplemented from mp::ui.

Definition at line 204 of file multiplayer_wait.cpp.

References cancel_button_, gui::button::pressed(), mp::ui::QUIT, and mp::ui::set_result().

void mp::wait::join_game ( bool  observe  ) 

const game_state & mp::wait::get_state (  ) 

Definition at line 316 of file multiplayer_wait.cpp.

References state_.

Referenced by enter_wait_mode().

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 321 of file multiplayer_wait.cpp.

References game_events::add_events(), config::child(), DBG_NW, statistics::fresh_stats(), config::get_children(), level_, mp::level_to_gamestate(), LOG_NW, statistics::read_stats(), game_state::scenario, and state_.

Referenced by enter_wait_mode().

game_state & mp::wait::request_snapshot (  ) 

Definition at line 362 of file multiplayer_wait.cpp.

References config::add_child(), cfg, and state_.

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

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

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

void mp::wait::generate_menu (  )  [private]


Member Data Documentation

Definition at line 74 of file multiplayer_wait.hpp.

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

Definition at line 75 of file multiplayer_wait.hpp.

Referenced by layout_children().

Definition at line 76 of file multiplayer_wait.hpp.

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

Definition at line 80 of file multiplayer_wait.hpp.

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

Reimplemented from gui::widget.

Definition at line 81 of file multiplayer_wait.hpp.

Referenced by get_state(), request_snapshot(), and start_game().

bool mp::wait::stop_updates_ [private]

Definition at line 83 of file multiplayer_wait.hpp.

Referenced by generate_menu(), and process_network_data().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs