The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
statistics_dialog.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2006 - 2016 by Joerg Hinrichs <[email protected]>
3  wesnoth playturn Copyright (C) 2003 by David White <[email protected]>
4  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #ifndef STATISTICS_DIALOG_HPP_INCLUDED
17 #define STATISTICS_DIALOG_HPP_INCLUDED
18 
19 #include "construct_dialog.hpp"
20 #include "statistics.hpp"
21 
22 #include <vector>
23 #include <string>
24 
25 class game_display;
26 
28 {
29 public:
31  const std::string& title,
32  const unsigned int team,
33  const std::string& team_id,
34  const std::string& player);
36 protected:
37  void action(gui::dialog_process_info &dp_info);
38 private:
39  /// Picks out the stats structure that was selected for displaying.
40  inline const statistics::stats & current_stats();
41  /// Fills in the text to be displayed in the dialog.
42  void display_stats(bool campaign);
43  /// Implements the scenario selection popup.
44  void do_scene_selection();
45 
53  unsigned int team_num_;
54  std::vector<int> unit_count_;
55 
56  // This is static so the setting can be remembered throughout the session.
57  static bool use_campaign_;
58 };
59 
60 #endif
const statistics::stats & current_stats()
Picks out the stats structure that was selected for displaying.
std::vector< int > unit_count_
gui::dialog_button * toggle_btn_
const statistics::stats campaign_
void display_stats(bool campaign)
Fills in the text to be displayed in the dialog.
std::vector< std::pair< const std::string *, const stats * > > levels
Stats (and name) for each scenario. The pointers are never nullptr.
Definition: statistics.hpp:115
statistics_dialog(game_display &disp, const std::string &title, const unsigned int team, const std::string &team_id, const std::string &player)
const statistics::levels scenarios_
This class stores all the data for a single 'side' (in game nomenclature).
Definition: team.hpp:50
gui::dialog_button * scene_btn_
void action(gui::dialog_process_info &dp_info)
void do_scene_selection()
Implements the scenario selection popup.
gui::dialog_button * detail_btn_
GLsizei const GLcharARB ** string
Definition: glew.h:4503