32 virtual const std::string&
window_id()
const override;
45 const std::string&
type,
46 const long long& damage,
47 const long long& expected,
48 const long long& turn_damage,
49 const long long& turn_expected,
50 const bool show_this_turn);
61 const std::string&
type,
62 const bool more_is_better,
65 const bool show_this_turn);
Abstract base class for all modal dialogs.
std::size_t selection_index_
const team & current_team_
const statistics_t::stats & current_stats()
Picks out the stats structure that was selected for displaying.
void on_primary_list_select()
virtual const std::string & window_id() const override
The ID of the window to build.
const statistics_t::levels scenarios_
statistics_dialog(statistics_t &statistics, const team ¤t_team)
virtual void pre_show() override
Actions to be taken before showing the window.
void on_scenario_select()
void add_damage_row(const std::string &type, const long long &damage, const long long &expected, const long long &turn_damage, const long long &turn_expected, const bool show_this_turn)
Add a row to the Damage table.
const statistics_t::stats campaign_
void add_hits_row(const std::string &type, const bool more_is_better, const statistics_t::stats::hitrate_map &by_cth, const statistics_t::stats::hitrate_map &turn_by_cth, const bool show_this_turn)
Add a row to the Hits table.
void add_stat_row(const std::string &type, const statistics_t::stats::str_int_map &value, const bool has_cost=true)
std::vector< const statistics_t::stats::str_int_map * > main_stat_table_
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
std::vector< std::pair< const std::string *, const stats * > > levels
Stats (and name) for each scenario.
This class stores all the data for a single 'side' (in game nomenclature).
#define DEFINE_SIMPLE_DISPLAY_WRAPPER(dialog)
Adds a bare-bones static display function to a dialog class that immediately invokes the dialogs's mo...
std::map< int, hitrate_t > hitrate_map
A type that maps chance-to-hit percentage to number of hits and strikes at that CTH.
std::map< std::string, int > str_int_map