The Battle for Wesnoth  1.15.13+dev
Public Member Functions | Private Attributes | Friends | List of all members
gui2::game_tip Class Reference

The tips of day structure. More...

#include <tips.hpp>

Public Member Functions

 game_tip (const t_string &text, const t_string &source, const std::string &unit_filter)
const t_stringtext () const
const t_stringsource () const

Private Attributes

t_string text_
 The text of the tip. More...
t_string source_
 The source of the tip. More...
std::vector< std::string > unit_filter_
 List of units to filter the tip upon. More...


std::vector< game_tiptip_of_the_day::load (const config &)
std::vector< game_tiptip_of_the_day::shuffle (const std::vector< game_tip > &tips)

Detailed Description

The tips of day structure.

Definition at line 52 of file tips.hpp.

Constructor & Destructor Documentation

◆ game_tip()

gui2::game_tip::game_tip ( const t_string text,
const t_string source,
const std::string &  unit_filter 

Definition at line 26 of file tips.cpp.

Member Function Documentation

◆ source()

const t_string& gui2::game_tip::source ( ) const

◆ text()

const t_string& gui2::game_tip::text ( ) const

Definition at line 57 of file tips.hpp.

Friends And Related Function Documentation

◆ tip_of_the_day::load

std::vector<game_tip> tip_of_the_day::load ( const config )

◆ tip_of_the_day::shuffle

std::vector<game_tip> tip_of_the_day::shuffle ( const std::vector< game_tip > &  tips)

Member Data Documentation

◆ source_

t_string gui2::game_tip::source_

The source of the tip.

Definition at line 75 of file tips.hpp.

◆ text_

t_string gui2::game_tip::text_

The text of the tip.

Definition at line 72 of file tips.hpp.

◆ unit_filter_

std::vector<std::string> gui2::game_tip::unit_filter_

List of units to filter the tip upon.

If the list is empty the tip is shown. Else the unit must have encountered at least one of the units in the list.

Definition at line 83 of file tips.hpp.

The documentation for this class was generated from the following files: