#include <multiplayer_configure.hpp>
Classes | |
struct | nolock_settings |
struct | process_event_data |
Public Member Functions | |
configure (CVideo &v, twesnothd_connection *wesnothd_connection, const config &game_config, chat &c, config &gamelist, saved_game &game, bool local_players_only) | |
gives the user the option to adjust the passed saved_game Call get_parameters to finalize; More... | |
~configure () | |
void | get_parameters () |
Public Member Functions inherited from mp::ui | |
ui (CVideo &v, twesnothd_connection *wesnothd_connection, const std::string &title, const config &cfg, chat &c, config &gamelist) | |
void | process_network () |
Asks the multiplayer_ui to pump some data from the network, and then to process it. More... | |
result | get_result () |
Returns the result of the current widget. More... | |
void | set_location (const SDL_Rect &rect) |
Hides children, moves them (using layout_children), then shows them. More... | |
const std::vector< std::string > & | user_list () const |
void | send_to_server (const config &cfg) override |
bool | receive_from_server (config &dst) |
plugins_context * | get_plugins_context () |
Public Member Functions inherited from gui::widget | |
SDL_Rect const & | location () const |
void | set_location (int x, int y) |
void | set_width (int w) |
void | set_height (int h) |
void | set_measurements (int w, int h) |
int | width () const |
int | height () const |
bool | focus (const SDL_Event *event) |
void | set_focus (bool focus) |
virtual void | hide (bool value=true) |
bool | hidden () const |
virtual void | enable (bool new_val=true) |
bool | enabled () const |
void | set_clip_rect (const SDL_Rect &rect) |
void | set_volatile (bool val=true) |
void | set_dirty (bool dirty=true) |
bool | dirty () const |
const std::string & | id () const |
void | set_id (const std::string &id) |
void | set_help_string (const std::string &str) |
void | set_tooltip_string (const std::string &str) |
virtual void | process_help_string (int mousex, int mousey) |
virtual void | process_tooltip_string (int mousex, int mousey) |
Public Member Functions inherited from events::sdl_handler | |
virtual bool | requires_event_focus (const SDL_Event *=nullptr) const |
virtual void | join () |
virtual void | join (context &c) |
virtual void | join_same (sdl_handler *parent) |
virtual void | leave () |
virtual void | join_global () |
virtual void | leave_global () |
Protected Member Functions | |
virtual void | layout_children (const SDL_Rect &rect) |
Lays the children out. More... | |
virtual void | process_event () |
virtual void | hide_children (bool hide=true) |
Hides or shows all gui::widget children of this widget. More... | |
Protected Member Functions inherited from mp::ui | |
int | xscale (int x) const |
int | yscale (int y) const |
SDL_Rect | client_area () const |
CVideo & | video () |
const config & | game_config () const |
Returns the main game config, as defined by loading the preprocessed WML files. More... | |
virtual void | draw_contents () |
virtual void | handle_event (const SDL_Event &event) |
virtual void | handle_key_event (const SDL_KeyboardEvent &event) |
void | add_chat_message (const time_t &time, const std::string &speaker, int side, const std::string &message, events::chat_handler::MESSAGE_TYPE type=events::chat_handler::MESSAGE_PRIVATE) |
Override chat_handler. More... | |
void | send_chat_message (const std::string &message, bool allies_only=false) |
void | process_message (const config &msg, const bool whisper=false) |
Process chat messages. More... | |
virtual void | process_network_data (const config &data) |
Processes any pending network data. More... | |
result | set_result (result res) |
Sets the result of this dialog, to be checked by get_result(). More... | |
void | set_selected_game (const std::string &game_name) |
Sets the name of the selected game which is used to highlight the names of the players which have joined this game. More... | |
virtual void | gamelist_updated (bool silent=true) |
Called each time the gamelist_ variable is updated. More... | |
void | set_user_list (const std::vector< std::string > &, bool silent) |
Sets the user list. More... | |
void | set_user_menu_items (const std::vector< std::string > &list) |
config & | gamelist () |
Returns the current gamelist. More... | |
void | append_to_title (const std::string &name) |
const gui::label & | title () const |
std::string | get_selected_user_game () |
bool | selected_user_changed () const |
void | set_selected_user_changed (const bool &changed) |
Protected Member Functions inherited from gui::widget | |
widget (widget const &o) | |
widget (CVideo &video, const bool auto_join=true) | |
virtual | ~widget () |
void | bg_register (SDL_Rect const &rect) |
void | bg_restore () const |
void | bg_restore (SDL_Rect const &rect) const |
void | bg_update () |
void | bg_cancel () |
CVideo & | video () const |
virtual void | draw () |
virtual void | update_location (SDL_Rect const &rect) |
const SDL_Rect * | clip_rect () const |
virtual sdl_handler_vector | member_handlers () |
virtual void | handle_window_event (SDL_Event const &event) |
bool | mouse_locked () const |
void | aquire_mouse_lock () |
void | free_mouse_lock () |
Protected Member Functions inherited from events::sdl_handler | |
sdl_handler (const bool auto_join=true) | |
virtual | ~sdl_handler () |
virtual std::vector < sdl_handler * > | handler_members () |
Private Member Functions | |
void | process_event_impl (const process_event_data &) |
bool | plugin_event_helper (const process_event_data &) |
Additional Inherited Members | |
Public Types inherited from mp::ui | |
enum | result { CONTINUE, JOIN, OBSERVE, CREATE, LOAD_GAME, PREFERENCES, PLAY, QUIT } |
enum | user_relation { ME, FRIEND, NEUTRAL, IGNORED } |
enum | user_state { LOBBY, GAME, SEL_GAME } |
Protected Attributes inherited from mp::ui | |
CVideo & | video_ |
twesnothd_connection * | wesnothd_connection_ |
boost::scoped_ptr < plugins_context > | plugins_context_ |
Protected Attributes inherited from gui::widget | |
bool | focus_ |
Static Protected Attributes inherited from mp::ui | |
static const int | xscale_base = 1024 |
static const int | yscale_base = 768 |
Definition at line 32 of file multiplayer_configure.hpp.
mp::configure::configure | ( | CVideo & | v, |
twesnothd_connection * | wesnothd_connection, | ||
const config & | game_config, | ||
chat & | c, | ||
config & | gamelist, | ||
saved_game & | game, | ||
bool | local_players_only | ||
) |
gives the user the option to adjust the passed saved_game Call get_parameters to finalize;
Definition at line 65 of file multiplayer_configure.cpp.
References _(), mp_game_settings::active_mods, ng::configure_engine::allow_observers_default(), game_classification::campaign, saved_game::classification(), countdown_action_bonus_slider_, countdown_game_, countdown_init_time_slider_, countdown_reservoir_time_slider_, countdown_turn_bonus_slider_, mp::ui::CREATE, DBG_MP, gui::button::enable(), engine_, ng::configure_engine::entry_point_titles(), entry_points_combo_, ng::configure_engine::fog_game_default(), ng::configure_engine::force_lock_settings(), ng::configure_engine::game_name_default(), mp::ui::gamelist_updated(), saved_game::get_scenario_id(), get_str, translation::gettext(), mp::options::manager::has_options(), i, mp::options::manager::init_widgets(), ng::configure_engine::mp_countdown_action_bonus_default(), ng::configure_engine::mp_countdown_default(), ng::configure_engine::mp_countdown_init_time_default(), ng::configure_engine::mp_countdown_reservoir_time_default(), ng::configure_engine::mp_countdown_turn_bonus_default(), mp_game_settings::mp_era, name_entry_, nolock_settings_, font::NORMAL_COLOR, ng::configure_engine::num_turns_default(), observers_game_, oos_debug_, options_manager_, parameters_, plugin_event_helper(), mp::ui::plugins_context_, ng::configure_engine::random_faction_mode(), random_faction_mode_, random_faction_mode_label_, ng::configure_engine::random_start_time_default(), registered_users_only_, ng::configure_engine::registered_users_only_default(), ng::depcheck::SCENARIO, mp::options::manager::set_campaign(), gui::button::set_check(), mp::options::manager::set_era(), gui::widget::set_help_string(), gui::slider::set_increment(), gui::combo::set_items(), gui::slider::set_max(), gui::slider::set_min(), mp::options::manager::set_modifications(), mp::ui::set_result(), mp::options::manager::set_scenario(), gui::combo::set_selected(), gui::textbox::set_text(), gui::slider::set_value(), show_entry_points_, ng::configure_engine::shroud_game_default(), shuffle_sides_, ng::configure_engine::shuffle_sides_default(), state_, settings::turns_max, settings::turns_min, settings::turns_step, ng::configure_engine::use_map_settings(), ng::configure_engine::village_gold_default(), ng::configure_engine::village_support_default(), and ng::configure_engine::xp_modifier_default().
mp::configure::~configure | ( | ) |
Definition at line 248 of file multiplayer_configure.cpp.
References ng::configure_engine::allow_observers(), mp::ui::CREATE, DBG_MP, gui::widget::enabled(), engine_, ng::configure_engine::fog_game(), mp::ui::get_result(), ng::configure_engine::mp_countdown(), ng::configure_engine::mp_countdown_action_bonus(), ng::configure_engine::mp_countdown_init_time(), ng::configure_engine::mp_countdown_reservoir_time(), ng::configure_engine::mp_countdown_turn_bonus(), ng::configure_engine::num_turns(), observers_game_, ng::configure_engine::options(), ng::configure_engine::random_faction_mode(), ng::configure_engine::random_start_time(), ng::configure_engine::registered_users_only(), registered_users_only_, preferences::set_allow_observers(), preferences::set_countdown(), preferences::set_countdown_action_bonus(), preferences::set_countdown_init_time(), preferences::set_countdown_reservoir_time(), preferences::set_countdown_turn_bonus(), preferences::set_fog(), preferences::set_options(), preferences::set_random_faction_mode(), preferences::set_random_start_time(), preferences::set_registered_users_only(), preferences::set_shroud(), preferences::set_shuffle_sides(), preferences::set_turns(), preferences::set_use_map_settings(), preferences::set_village_gold(), preferences::set_village_support(), preferences::set_xp_modifier(), ng::configure_engine::shroud_game(), ng::configure_engine::shuffle_sides(), ng::configure_engine::use_map_settings(), ng::configure_engine::village_gold(), ng::configure_engine::village_support(), and ng::configure_engine::xp_modifier().
void mp::configure::get_parameters | ( | ) |
Definition at line 290 of file multiplayer_configure.cpp.
References gui::button::checked(), countdown_action_bonus_slider_, countdown_game_, countdown_init_time_slider_, countdown_reservoir_time_slider_, countdown_turn_bonus_slider_, DBG_MP, engine_, mp::options::manager::get_values(), gui::slider::max_value(), name_entry_, nolock_settings_, observers_game_, oos_debug_, options_manager_, random_faction_mode_, registered_users_only_, gui::combo::selected(), ng::configure_engine::set_allow_observers(), ng::configure_engine::set_fog_game(), ng::configure_engine::set_game_name(), ng::configure_engine::set_mp_countdown(), ng::configure_engine::set_mp_countdown_action_bonus(), ng::configure_engine::set_mp_countdown_init_time(), ng::configure_engine::set_mp_countdown_reservoir_time(), ng::configure_engine::set_mp_countdown_turn_bonus(), ng::configure_engine::set_num_turns(), ng::configure_engine::set_oos_debug(), ng::configure_engine::set_options(), ng::configure_engine::set_random_faction_mode(), ng::configure_engine::set_random_start_time(), ng::configure_engine::set_registered_users_only(), ng::configure_engine::set_shroud_game(), ng::configure_engine::set_shuffle_sides(), ng::configure_engine::set_use_map_settings(), ng::configure_engine::set_village_gold(), ng::configure_engine::set_village_support(), ng::configure_engine::set_xp_modifier(), shuffle_sides_, gui::textbox::text(), gui::slider::value(), and ng::configure_engine::write_parameters().
Referenced by sp::enter_configure_mode(), and enter_configure_mode().
|
protectedvirtual |
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 486 of file multiplayer_configure.cpp.
References cancel_game_, 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_, DBG_MP, entry_points_combo_, entry_points_label_, gui::scrollarea::hide(), gui::widget::hide(), gui::scrollpane::hide(), mp::ui::hide_children(), mp::options::manager::hide_children(), launch_game_, name_entry_, name_entry_label_, nolock_settings_, observers_game_, oos_debug_, options_manager_, options_pane_left_, options_pane_right_, password_button_, random_faction_mode_, random_faction_mode_label_, registered_users_only_, and shuffle_sides_.
|
protectedvirtual |
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 541 of file multiplayer_configure.cpp.
References gui::scrollpane::add_widget(), gui::ButtonHPadding, cancel_game_, mp::ui::client_area(), 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_, DBG_MP, entry_points_combo_, entry_points_label_, gui::widget::height(), gui::widget::hide(), launch_game_, mp::ui::layout_children(), mp::options::manager::layout_widgets(), local_players_only_, gui::widget::location(), name_entry_, name_entry_label_, nolock_settings_, observers_game_, oos_debug_, options_manager_, options_pane_left_, options_pane_right_, password_button_, random_faction_mode_, random_faction_mode_label_, registered_users_only_, gui::widget::set_height(), gui::widget::set_location(), gui::scrollpane::set_location(), gui::widget::set_width(), show_entry_points_, shuffle_sides_, swap(), mp::ui::title(), and gui::widget::width().
|
private |
Definition at line 338 of file multiplayer_configure.cpp.
References mp::ui::CONTINUE, mp::ui::get_result(), and process_event_impl().
Referenced by configure().
|
protectedvirtual |
Reimplemented from mp::ui.
Definition at line 344 of file multiplayer_configure.cpp.
References cancel_game_, mp::configure::process_event_data::launch, launch_game_, gui::button::pressed(), tooltips::process(), process_event_impl(), and mp::configure::process_event_data::quit.
|
private |
Definition at line 357 of file multiplayer_configure.cpp.
References _(), gui::combo::changed(), gui::button::checked(), 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, gui::slider::enable(), gui::widget::enable(), engine_, entry_points_combo_, gui2::tmp_create_game_set_password::execute(), ng::configure_engine::fog_game_default(), force_use_map_settings_check_, mp::configure::process_event_data::launch, mp_countdown_init_time_, mp_countdown_reservoir_time_, name_entry_, nolock_settings_, ng::configure_engine::num_turns_default(), options_manager_, parameters_, mp_game_settings::password, password_button_, gui::button::pressed(), mp::options::manager::process_event(), mp::ui::QUIT, mp::configure::process_event_data::quit, ng::configure_engine::random_start_time_default(), gui::combo::selected(), mp::ui::set_result(), ng::configure_engine::set_scenario(), gui::label::set_text(), ng::configure_engine::set_use_map_settings(), gui::slider::set_value(), gui2::show_transient_message(), ng::configure_engine::shroud_game_default(), gui::textbox::text(), ng::configure_engine::use_map_settings(), gui::slider::value(), mp::ui::video(), preferences::village_gold(), ng::configure_engine::village_gold_default(), game_config::village_support, ng::configure_engine::village_support_default(), and ng::configure_engine::xp_modifier_default().
Referenced by plugin_event_helper(), and process_event().
|
private |
Definition at line 90 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event().
|
private |
Definition at line 79 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 80 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 72 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 74 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 73 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 76 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 75 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 77 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 78 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 108 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), process_event_impl(), and ~configure().
|
private |
Definition at line 102 of file multiplayer_configure.hpp.
|
private |
Definition at line 97 of file multiplayer_configure.hpp.
Referenced by configure(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 96 of file multiplayer_configure.hpp.
Referenced by hide_children(), and layout_children().
|
private |
Definition at line 105 of file multiplayer_configure.hpp.
Referenced by process_event_impl().
|
private |
Definition at line 91 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event().
|
private |
Definition at line 66 of file multiplayer_configure.hpp.
Referenced by layout_children().
|
private |
Definition at line 69 of file multiplayer_configure.hpp.
Referenced by process_event_impl().
|
private |
Definition at line 70 of file multiplayer_configure.hpp.
Referenced by process_event_impl().
|
private |
Definition at line 94 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 82 of file multiplayer_configure.hpp.
Referenced by hide_children(), and layout_children().
|
private |
Definition at line 111 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 83 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and ~configure().
|
private |
Definition at line 85 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), and layout_children().
|
private |
Definition at line 109 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 99 of file multiplayer_configure.hpp.
Referenced by hide_children(), and layout_children().
|
private |
Definition at line 100 of file multiplayer_configure.hpp.
Referenced by hide_children(), and layout_children().
|
private |
Definition at line 107 of file multiplayer_configure.hpp.
Referenced by configure(), and process_event_impl().
|
private |
Definition at line 92 of file multiplayer_configure.hpp.
Referenced by hide_children(), layout_children(), and process_event_impl().
|
private |
Definition at line 88 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), and layout_children().
|
private |
Definition at line 87 of file multiplayer_configure.hpp.
Referenced by configure(), hide_children(), and layout_children().
|
private |
Definition at line 84 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), layout_children(), and ~configure().
|
private |
Definition at line 103 of file multiplayer_configure.hpp.
Referenced by configure(), and layout_children().
|
private |
Definition at line 86 of file multiplayer_configure.hpp.
Referenced by configure(), get_parameters(), hide_children(), and layout_children().
|
private |
Definition at line 106 of file multiplayer_configure.hpp.
Referenced by configure().
|
private |
Definition at line 68 of file multiplayer_configure.hpp.