21 #define GETTEXT_DOMAIN "wesnoth-help"
40 #include "widgets/button.hpp"
48 #define WRN_DP LOG_STREAM(warn, log_display)
51 #define ERR_HELP LOG_STREAM(err, log_help)
86 std::string var_id =
t.get_cfg()[
"variation_id"].str();
88 var_id =
t.get_cfg()[
"variation_name"].str();
89 bool hide_help =
t.hide_help();
90 bool use_variation =
false;
91 if (!var_id.empty()) {
151 void show_unit_help(
const std::string& show_topic,
bool has_variations,
bool hidden)
205 gui2::dialogs::help_browser::display(toplevel_sec, show_topic);
static game_config_manager * get()
A class grating read only view to a vector of config objects, viewed as one config with all children ...
std::set< t_translation::terrain_code > & encountered_terrains()
std::set< std::string > & encountered_units()
const unit_type * find(const std::string &key, unit_type::BUILD_STATUS status=unit_type::FULL) const
Finds a unit_type by its id() and makes sure it is built to the specified level.
void build_all(unit_type::BUILD_STATUS status)
Makes sure the all unit_types are built to the specified level.
A single unit type that the player may recruit.
This class represents a single unit of a specific type.
Definitions for the interface to Wesnoth Markup Language (WML).
const unit_type & type() const
This unit's type, accounting for gender and variation.
static lg::log_domain log_display("display")
static lg::log_domain log_help("help")
Standard logging facilities (interface).
Game configuration data as global variables.
std::string hidden_symbol(bool hidden)
std::unique_ptr< help_manager > ensure_cache_lifecycle()
Helper function for any of the show_help functions to control the cache's lifecycle; can also be used...
void show_help(const std::string &show_topic)
Open the help browser, show topic with id show_topic.
int last_num_encountered_units
const std::string unit_prefix
const std::string variation_prefix
void show_terrain_description(const terrain_type &t)
void show_terrain_help(const std::string &show_topic, bool hidden)
Open the help browser, show terrain with id terrain_id.
void show_with_toplevel(const section &toplevel, const std::string &show_topic="")
Open a help dialog using a specified toplevel.
void generate_contents()
Generate the help contents from the configurations given to the manager.
const std::string terrain_prefix
boost::tribool last_debug_state
help::section default_toplevel
void show_unit_description(const unit &u)
const game_config_view * game_cfg
int last_num_encountered_terrains
void show_unit_help(const std::string &show_topic, bool has_variations, bool hidden)
Open the help browser, show unit with id unit_id.
help::section hidden_sections
void show_variation_help(const std::string &unit, const std::string &variation, bool hidden)
Open the help browser, show the variation of the unit matching.
This file contains object "key", which is used to store information about keys while annotation parsi...
This file contains the settings handling of the widget library.
help_manager(const game_config_view *game_config)
A section contains topics and sections along with title and ID.
unit_type_data unit_types