Functions | |
std::vector< ttip > | load (const config &cfg) |
Loads the tips from a config. More... | |
std::vector< ttip > | shuffle (const std::vector< ttip > &tips) |
Shuffles the tips. More... | |
Loads the tips from a config.
cfg | A config with the tips. |
Definition at line 36 of file tips.cpp.
References config::child_range(), and gui2::tip::tip().
Referenced by gui2::tgui_definition::read().
std::vector< ttip > gui2::tips::shuffle | ( | const std::vector< ttip > & | tips | ) |
Shuffles the tips.
This routine shuffles the tips and filters out the unwanted ones.
tips | The tips. |
Definition at line 49 of file tips.cpp.
References preferences::encountered_units(), gui2::tip::tip(), gui2::ttip::unit_filter_, and resources::units.
Referenced by choose_track(), gui2::settings::get_tips(), and editor::editor_action_shuffle_area::perform_without_undo().