15 #define GETTEXT_DOMAIN "wesnoth-lib"
55 for(
const auto &
tip : tips)
58 result.push_back(
tip);
62 if(units.find(
unit) != units.end()) {
63 result.push_back(
tip);
70 std::random_shuffle(result.begin(), result.end());
child_itors child_range(const std::string &key)
std::vector< std::string > unit_filter_
List of units to filter the tip upon.
std::vector< ttip > load(const config &cfg)
Loads the tips from a config.
tformula< t_string > text_
The text to draw.
Definitions for the interface to Wesnoth Markup Language (WML).
A class inherited from ttext_box that displays its input as stars.
std::vector< ttip > shuffle(const std::vector< ttip > &tips)
Shuffles the tips.
std::set< std::string > & encountered_units()
The tips of day structure.
std::vector< std::string > split(std::string const &val, const char c, const int flags)
Splits a (comma-)separated string into a vector of pieces.
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
GLsizei GLsizei GLchar * source
static std::vector< ttip > tips