Public Member Functions | Protected Member Functions | Private Attributes

mp::create Class Reference

#include <multiplayer_create.hpp>

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

List of all members.

Public Member Functions

 create (game_display &dist, const config &game_config, chat &c, config &gamelist, bool local_players_only)
 ~create ()
mp_game_settingsget_parameters ()
int num_turns () const

Protected Member Functions

virtual void layout_children (const SDL_Rect &rect)
 Lays the children out.
virtual void process_event ()
virtual void hide_children (bool hide=true)
 Hides or shows all gui::widget children of this widget.

Private Attributes

bool local_players_only_
tooltips::manager tooltip_manager_
int map_selection_
int mp_countdown_init_time_
int mp_countdown_reservoir_time_
std::vector< std::string > user_maps_
std::vector< std::string > map_options_
std::vector< size_t > map_index_
 Due to maps not available the index of the selected map and mp scenarios is not 1:1 so we use a lookup table.
gui::menu maps_menu_
gui::slider turns_slider_
gui::label turns_label_
gui::button countdown_game_
gui::slider countdown_init_time_slider_
gui::label countdown_init_time_label_
gui::slider countdown_reservoir_time_slider_
gui::label countdown_reservoir_time_label_
gui::label countdown_turn_bonus_label_
gui::slider countdown_turn_bonus_slider_
gui::label countdown_action_bonus_label_
gui::slider countdown_action_bonus_slider_
gui::slider village_gold_slider_
gui::label village_gold_label_
gui::slider village_support_slider_
gui::label village_support_label_
gui::slider xp_modifier_slider_
gui::label xp_modifier_label_
gui::label name_entry_label_
gui::label num_players_label_
gui::label map_size_label_
gui::label era_label_
gui::label map_label_
gui::button use_map_settings_
gui::button random_start_time_
gui::button fog_game_
gui::button shroud_game_
gui::button observers_game_
gui::button shuffle_sides_
gui::button cancel_game_
gui::button launch_game_
gui::button regenerate_map_
gui::button generator_settings_
gui::button password_button_
gui::combo era_combo_
gui::combo vision_combo_
gui::textbox name_entry_
util::scoped_ptr
< surface_restorer
minimap_restorer_
SDL_Rect minimap_rect_
util::scoped_ptr< map_generatorgenerator_
int num_turns_
mp_game_settings parameters_

Detailed Description

Definition at line 30 of file multiplayer_create.hpp.


Constructor & Destructor Documentation

mp::create::create ( game_display dist,
const config game_config,
chat c,
config gamelist,
bool  local_players_only 
)

Definition at line 55 of file multiplayer_create.cpp.

References _, preferences::allow_observers(), config::child_range(), preferences::countdown(), preferences::countdown_action_bonus(), countdown_action_bonus_slider_, countdown_game_, preferences::countdown_init_time(), countdown_init_time_slider_, preferences::countdown_reservoir_time(), countdown_reservoir_time_slider_, preferences::countdown_turn_bonus(), countdown_turn_bonus_slider_, DBG_MP, preferences::era(), era_combo_, error(), FILE_NAME_ONLY, preferences::fog(), fog_game_, mp::ui::gamelist_updated(), get_files_in_dir(), get_user_data_dir(), HELP_STRING_SEPARATOR, preferences::login(), preferences::map(), map_index_, map_options_, maps_menu_, gui::menu::move_selection(), name_entry_, observers_game_, preferences::random_start_time(), random_start_time_, gui::button::set_check(), gui::widget::set_help_string(), gui::slider::set_increment(), gui::combo::set_items(), gui::menu::set_items(), gui::slider::set_max(), gui::slider::set_min(), gui::menu::set_numeric_keypress_selection(), gui::combo::set_selected(), gui::textbox::set_text(), gui::slider::set_value(), gui2::show_transient_message(), preferences::shroud(), shroud_game_, preferences::shuffle_sides(), shuffle_sides_, preferences::turns(), settings::turns_max, settings::turns_min, turns_slider_, settings::turns_step, preferences::use_map_settings(), use_map_settings_, user_maps_, vgettext(), display::video(), preferences::village_gold(), village_gold_slider_, preferences::village_support(), village_support_slider_, vision_combo_, preferences::xp_modifier(), and xp_modifier_slider_.

Here is the call graph for this function:

mp::create::~create (  ) 

Member Function Documentation

mp_game_settings & mp::create::get_parameters (  ) 
void mp::create::hide_children ( bool  hide = true  )  [protected, virtual]
void mp::create::layout_children ( const SDL_Rect &  rect  )  [protected, virtual]
int mp::create::num_turns (  )  const [inline]

Definition at line 37 of file multiplayer_create.hpp.

References num_turns_.

Referenced by enter_create_mode().

Here is the caller graph for this function:

void mp::create::process_event (  )  [protected, virtual]

Todo:
This might not be 100% correct, but at the moment it is not possible to show the fog and shroud per player. This might change in the future. NOTE when 'load game' is selected there are no sides.

Reimplemented from mp::ui.

Definition at line 340 of file multiplayer_create.cpp.

References _, config::add_child(), tooltips::add_tooltip(), util::scoped_resource< T, ReleasePolicy >::assign(), cancel_game_, gui::button::checked(), config::child(), config::child_count(), config::child_range(), config::clear(), tooltips::clear_tooltips(), countdown_action_bonus_label_, countdown_action_bonus_slider_, countdown_game_, countdown_init_time_label_, countdown_init_time_slider_, countdown_reservoir_time_label_, countdown_reservoir_time_slider_, countdown_turn_bonus_label_, countdown_turn_bonus_slider_, mp::ui::CREATE, create_map_generator(), twml_exception::dev_message, mp::ui::disp(), mp::ui::disp_, gui::menu::double_clicked(), draw_centered_on_background(), config::empty(), gui::button::enable(), gui::slider::enable(), gui::widget::enable(), ERR_CF, gui2::tmp_create_game_set_password::execute(), preferences::fog(), fog_game_, mp::ui::game_config(), generator_, generator_settings_, util::unique_ptr< T >::get(), settings::get_turns(), settings::get_village_gold(), settings::get_village_support(), settings::get_xp_modifier(), image::getMinimap(), gamemap::h(), config::hash(), mp_game_settings::hash, gui::widget::hide(), launch_game_, game_config::images::level, map_index_, map_selection_, map_size_label_, maps_menu_, game::error::message, minimap_rect_, minimap_restorer_, mp_countdown_init_time_, mp_countdown_reservoir_time_, name_entry_, num_players_label_, gui::menu::number_of_items(), parameters_, mp_game_settings::password, password_button_, pos, gui::button::pressed(), tooltips::process(), mp::ui::QUIT, preferences::random_start_time(), random_start_time_, read_map(), regenerate_map_, util::unique_ptr< T >::reset(), mp_game_settings::saved_game, mp_game_settings::scenario_data, gui::menu::selection(), gui::button::set_check(), mp::ui::set_result(), gui::label::set_text(), gui::slider::set_value(), gui2::show_message(), gui2::show_transient_message(), preferences::shroud(), shroud_game_, gui::textbox::text(), preferences::turns(), turns_label_, turns_slider_, utils::unicode_multiplication_sign, use_map_settings_, user_maps_, gui::slider::value(), gui::widget::video(), display::video(), preferences::village_gold(), village_gold_label_, village_gold_slider_, preferences::village_support(), game_config::village_support, village_support_label_, village_support_slider_, gamemap::w(), cursor::WAIT, preferences::xp_modifier(), xp_modifier_label_, and xp_modifier_slider_.


Member Data Documentation

Definition at line 94 of file multiplayer_create.hpp.

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

Definition at line 73 of file multiplayer_create.hpp.

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

Definition at line 68 of file multiplayer_create.hpp.

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

Definition at line 70 of file multiplayer_create.hpp.

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

Definition at line 71 of file multiplayer_create.hpp.

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

Definition at line 85 of file multiplayer_create.hpp.

Referenced by hide_children(), and layout_children().

Definition at line 107 of file multiplayer_create.hpp.

Referenced by hide_children(), and process_event().

Definition at line 97 of file multiplayer_create.hpp.

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

Definition at line 95 of file multiplayer_create.hpp.

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

Definition at line 46 of file multiplayer_create.hpp.

Referenced by layout_children().

std::vector<size_t> mp::create::map_index_ [private]

Due to maps not available the index of the selected map and mp scenarios is not 1:1 so we use a lookup table.

Definition at line 61 of file multiplayer_create.hpp.

Referenced by create(), and process_event().

Definition at line 86 of file multiplayer_create.hpp.

Referenced by hide_children(), and layout_children().

std::vector<std::string> mp::create::map_options_ [private]

Definition at line 55 of file multiplayer_create.hpp.

Referenced by create(), and layout_children().

Definition at line 49 of file multiplayer_create.hpp.

Referenced by process_event(), and ~create().

Definition at line 84 of file multiplayer_create.hpp.

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

Definition at line 63 of file multiplayer_create.hpp.

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

SDL_Rect mp::create::minimap_rect_ [private]

Definition at line 105 of file multiplayer_create.hpp.

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

Definition at line 104 of file multiplayer_create.hpp.

Referenced by hide_children(), and process_event().

Definition at line 50 of file multiplayer_create.hpp.

Referenced by process_event().

Definition at line 51 of file multiplayer_create.hpp.

Referenced by process_event().

Definition at line 82 of file multiplayer_create.hpp.

Referenced by hide_children(), and layout_children().

Definition at line 83 of file multiplayer_create.hpp.

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

int mp::create::num_turns_ [private]

Definition at line 109 of file multiplayer_create.hpp.

Referenced by get_parameters(), num_turns(), and ~create().

Definition at line 92 of file multiplayer_create.hpp.

Referenced by create(), get_parameters(), hide_children(), and layout_children().

Definition at line 110 of file multiplayer_create.hpp.

Referenced by get_parameters(), hide_children(), process_event(), and ~create().

Definition at line 98 of file multiplayer_create.hpp.

Referenced by layout_children(), and process_event().

Definition at line 96 of file multiplayer_create.hpp.

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

Definition at line 93 of file multiplayer_create.hpp.

Referenced by create(), get_parameters(), hide_children(), and layout_children().

Definition at line 48 of file multiplayer_create.hpp.

Definition at line 65 of file multiplayer_create.hpp.

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

std::vector<std::string> mp::create::user_maps_ [private]

Definition at line 54 of file multiplayer_create.hpp.

Referenced by create(), and process_event().

Definition at line 76 of file multiplayer_create.hpp.

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

Definition at line 78 of file multiplayer_create.hpp.

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

Definition at line 101 of file multiplayer_create.hpp.

Referenced by create(), get_parameters(), hide_children(), and layout_children().

Definition at line 80 of file multiplayer_create.hpp.

Referenced by hide_children(), layout_children(), 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:50 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs