00001 /* $Id: multiplayer_wait.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 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 #ifndef MULTIPLAYER_WAIT_HPP_INCLUDED 00017 #define MULTIPLAYER_WAIT_HPP_INCLUDED 00018 00019 #include "widgets/combo.hpp" 00020 00021 #include "leader_list.hpp" 00022 #include "gamestatus.hpp" 00023 #include "multiplayer_ui.hpp" 00024 #include "show_dialog.hpp" 00025 00026 namespace mp { 00027 00028 class wait : public ui 00029 { 00030 public: 00031 wait(game_display& disp, const config& cfg, chat& c, config& gamelist); 00032 virtual void process_event(); 00033 00034 void join_game(bool observe); 00035 00036 const game_state& get_state(); 00037 00038 void start_game(); 00039 00040 protected: 00041 virtual void layout_children(const SDL_Rect& rect); 00042 virtual void hide_children(bool hide=true); 00043 virtual void process_network_data(const config& data, const network::connection sock); 00044 private: 00045 class leader_preview_pane : public gui::preview_pane 00046 { 00047 public: 00048 leader_preview_pane(game_display& disp, 00049 const std::vector<const config *> &side_list, int color); 00050 00051 bool show_above() const; 00052 bool left_side() const; 00053 void set_selection(int index); 00054 std::string get_selected_leader(); 00055 std::string get_selected_gender(); 00056 00057 handler_vector handler_members(); 00058 private: 00059 virtual void draw_contents(); 00060 virtual void process_event(); 00061 00062 std::vector<const config *> side_list_; 00063 const int color_; 00064 gui::combo leader_combo_; // Must appear before the leader_list_manager 00065 gui::combo gender_combo_; // Must appear before the leader_list_manager 00066 leader_list_manager leaders_; 00067 size_t selection_; 00068 }; 00069 00070 void generate_menu(); 00071 00072 gui::button cancel_button_; 00073 gui::label start_label_; 00074 gui::menu game_menu_; 00075 00076 // int team_; 00077 00078 config level_; 00079 game_state state_; 00080 00081 bool stop_updates_; 00082 }; 00083 00084 } 00085 #endif
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:06 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |