20 #define GETTEXT_DOMAIN "wesnoth-editor" 
   37     for(
const unit_type_data::unit_type_map::value_type &
i : 
unit_types.
types()) {
 
   38         if(
i.second.do_not_list())
 
   50         cfg[
"id"] = 
i.second.id();
 
   51         cfg[
"name"] = 
i.second.plural_name();
 
   52         cfg[
"icon"] = 
i.second.get_icon_path_stem();
 
   68         ERR_ED << 
"No items found.";
 
   76     std::stringstream& tooltip_text)
 
   84         tooltip_text << 
"IMAGE NOT FOUND\n";
 
   85         ERR_ED << 
"image for unit type: '" << 
filename.str() << 
"' not found";
 
   88             ERR_ED << 
"Placeholder image not found";
 
   99     , selected_bg_items_()
 
A config object defines a single node in a WML file, with access to child nodes.
const team & viewing_team() const
std::vector< item_group > groups_
The editor_groups as defined in editor-groups.cfg.
const std::vector< std::string > & active_group()
std::map< std::string, std::vector< std::string > > group_map_
virtual void select_fg_item(const std::string &item_id) override
Select a foreground item.
void set_group(std::size_t index) override
const const unit_type & & selected_fg_item() const
Return the currently selected foreground/background item.
virtual void select_bg_item(const std::string &item_id) override
virtual void setup(const game_config_view &cfg) override
Setup the internal data structure.
virtual const std::string & get_id(const unit_type &terrain) override
virtual bool is_selected_bg_item(const std::string &id) override
virtual std::string get_help_string() const override
virtual void setup_item(const unit_type &item, texture &item_base_image, texture &item_overlay_image, std::stringstream &tooltip) override
std::set< std::string > selected_bg_items_
unit_palette(editor_display &gui, editor_toolkit &toolkit)
A class grating read only view to a vector of config objects, viewed as one config with all children ...
static std::string get_side_color_id(unsigned side)
Wrapper class to encapsulate creation and management of an SDL_Texture.
const race_map & races() const
const unit_type_map & types() const
A single unit type that the player may recruit.
const std::string & image() const
const std::string & id() const
The id for this unit_type.
const std::string & flag_rgb() const
const t_string & type_name() const
The name of the unit in the current language setting.
Manage the empty-palette in the editor.
texture get_texture(const image::locator &i_locator, TYPE type, bool skip_cache)
Returns an image texture suitable for hardware-accelerated rendering.
std::string filename
Filename.
unit_type_data unit_types