00001 /* $Id: multiplayer_create.hpp 54051 2012-04-30 21:52:38Z brilliand $ */ 00002 /* 00003 Copyright (C) 2007 - 2012 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 /** @file */ 00017 00018 #ifndef MULTIPLAYER_CREATE_HPP_INCLUDED 00019 #define MULTIPLAYER_CREATE_HPP_INCLUDED 00020 00021 #include "mp_game_settings.hpp" 00022 #include "multiplayer_ui.hpp" 00023 #include "widgets/slider.hpp" 00024 #include "widgets/combo.hpp" 00025 #include "mapgen.hpp" 00026 #include "tooltips.hpp" 00027 00028 namespace mp { 00029 00030 class create : public mp::ui 00031 { 00032 public: 00033 create(game_display& dist, const config& game_config, chat& c, config& gamelist, bool local_players_only); 00034 ~create(); 00035 00036 mp_game_settings& get_parameters(); 00037 int num_turns() const { return num_turns_; } 00038 00039 protected: 00040 virtual void layout_children(const SDL_Rect& rect); 00041 virtual void process_event(); 00042 virtual void hide_children(bool hide=true); 00043 00044 private: 00045 00046 bool local_players_only_; 00047 00048 tooltips::manager tooltip_manager_; 00049 int map_selection_; 00050 int mp_countdown_init_time_; 00051 int mp_countdown_reservoir_time_; 00052 00053 00054 std::vector<std::string> user_maps_; 00055 std::vector<std::string> map_options_; 00056 00057 /** 00058 * Due to maps not available the index of the selected map and mp scenarios 00059 * is not 1:1 so we use a lookup table. 00060 */ 00061 std::vector<size_t> map_index_; 00062 00063 gui::menu maps_menu_; 00064 gui::slider turns_slider_; 00065 gui::label turns_label_; 00066 gui::button countdown_game_; 00067 gui::slider countdown_init_time_slider_; 00068 gui::label countdown_init_time_label_; 00069 gui::slider countdown_reservoir_time_slider_; 00070 gui::label countdown_reservoir_time_label_; 00071 gui::label countdown_turn_bonus_label_; 00072 gui::slider countdown_turn_bonus_slider_; 00073 gui::label countdown_action_bonus_label_; 00074 gui::slider countdown_action_bonus_slider_; 00075 gui::slider village_gold_slider_; 00076 gui::label village_gold_label_; 00077 gui::slider village_support_slider_; 00078 gui::label village_support_label_; 00079 gui::slider xp_modifier_slider_; 00080 gui::label xp_modifier_label_; 00081 00082 gui::label name_entry_label_; 00083 gui::label num_players_label_; 00084 gui::label map_size_label_; 00085 gui::label era_label_; 00086 gui::label map_label_; 00087 00088 gui::button use_map_settings_; 00089 gui::button random_start_time_; 00090 gui::button fog_game_; 00091 gui::button shroud_game_; 00092 gui::button observers_game_; 00093 gui::button shuffle_sides_; 00094 gui::button cancel_game_; 00095 gui::button launch_game_; 00096 gui::button regenerate_map_; 00097 gui::button generator_settings_; 00098 gui::button password_button_; 00099 00100 gui::combo era_combo_; 00101 gui::combo vision_combo_; 00102 gui::textbox name_entry_; 00103 00104 util::scoped_ptr<surface_restorer> minimap_restorer_; 00105 SDL_Rect minimap_rect_; 00106 00107 util::scoped_ptr<map_generator> generator_; 00108 00109 int num_turns_; 00110 mp_game_settings parameters_; 00111 }; 00112 00113 } // end namespace mp 00114 00115 #endif 00116
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:06 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |