The Battle for Wesnoth  1.19.7+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...
 

Friends

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 53 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 28 of file tips.cpp.

Member Function Documentation

◆ source()

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

Definition at line 63 of file tips.hpp.

References source_.

◆ text()

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

Definition at line 58 of file tips.hpp.

References text_.

Friends And Related Function Documentation

◆ tip_of_the_day::load

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

◆ tip_of_the_day::shuffle

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

Member Data Documentation

◆ source_

t_string gui2::game_tip::source_
private

The source of the tip.

Definition at line 76 of file tips.hpp.

Referenced by source().

◆ text_

t_string gui2::game_tip::text_
private

The text of the tip.

Definition at line 73 of file tips.hpp.

Referenced by text().

◆ unit_filter_

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

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 84 of file tips.hpp.


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