The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
multiplayer_wait.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 - 2016 by David White <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef MULTIPLAYER_WAIT_HPP_INCLUDED
16 #define MULTIPLAYER_WAIT_HPP_INCLUDED
17 
18 #include "flg_manager.hpp"
19 #include "multiplayer_ui.hpp"
20 #include "widgets/combo.hpp"
21 
22 namespace mp {
23 
24 class wait : public ui
25 {
26 public:
27  wait(CVideo& v, twesnothd_connection* wesnothd_connection, const config& cfg, saved_game& state, chat& c,
28  config& gamelist, const bool first_scenario = true);
29  ~wait();
30  virtual void process_event();
31 
32  void join_game(bool observe);
33 
34  void start_game();
35 
36 protected:
37  virtual void layout_children(const SDL_Rect& rect);
38  virtual void hide_children(bool hide=true);
39  virtual void process_network_data(const config& data);
40 
41 private:
43  {
44  public:
46  const std::string& color);
47 
48  bool show_above() const;
49  bool left_side() const;
50  void set_selection(int index);
51 
53 
54  private:
55  virtual void process_event();
56  virtual void draw_contents();
57 
59 
61 
64  };
65 
66  void generate_menu();
67  bool download_level_data();
69  const config& get_scenario() const;
70 
74 
77 
78  const bool first_scenario_;
80 
81  void process_event_impl(bool);
82 };
83 
84 }
85 #endif
void generate_menu()
std::vector< events::sdl_handler * > sdl_handler_vector
Definition: events.hpp:163
leader_preview_pane(CVideo &v, ng::flg_manager &flg, const std::string &color)
const GLfloat * c
Definition: glew.h:12741
gui::button cancel_button_
Definition: video.hpp:58
void process_event_impl(bool)
virtual void layout_children(const SDL_Rect &rect)
Lays the children out.
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definition: glew.h:1347
FLG stands for faction, leader and gender.
Definition: flg_manager.hpp:32
virtual void process_network_data(const config &data)
Processes any pending network data.
sdl_handler_vector handler_members()
This module controls the multiplayer lobby.
virtual void process_event()
A class that represents a TCP/IP connection to the wesnothd server.
saved_game & state_
virtual void hide(bool value=true)
Definition: widget.cpp:162
const GLdouble * v
Definition: glew.h:1359
bool download_level_data()
gui::menu game_menu_
GLuint color
Definition: glew.h:5801
GLuint index
Definition: glew.h:1782
config & gamelist()
Returns the current gamelist.
gui::label start_label_
void join_game(bool observe)
wait(CVideo &v, twesnothd_connection *wesnothd_connection, const config &cfg, saved_game &state, chat &c, config &gamelist, const bool first_scenario=true)
this class memorizes a chat session.
virtual void hide_children(bool hide=true)
Hides or shows all gui::widget children of this widget.
config & get_scenario()
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
const bool first_scenario_
GLsizei const GLcharARB ** string
Definition: glew.h:4503
a base class for the different multiplayer base dialogs: game list, create game, wait game...