20 #define GETTEXT_DOMAIN "wesnoth-editor"
44 if(!group[
"core"].to_bool(
false))
56 ERR_ED <<
"No items found.";
64 std::stringstream& tooltip_text)
68 if(item.
image.empty()) {
74 tooltip_text <<
"IMAGE NOT FOUND\n";
75 ERR_ED <<
"image for item type: '" <<
filename.str() <<
"' not found";
78 ERR_ED <<
"Placeholder image not found";
83 tooltip_text << item.
name;
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
std::set< std::string > non_core_items_
std::vector< item_group > groups_
The editor_groups as defined in editor-groups.cfg.
virtual void select_bg_item(const std::string &item_id) override
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 overlay & selected_fg_item() const
Return the currently selected foreground/background item.
virtual std::string get_help_string() const override
virtual void setup(const game_config_view &cfg) override
Setup the internal data structure.
virtual const std::string & get_id(const overlay &item) override
virtual void setup_item(const overlay &item, texture &item_base_image, texture &item_overlay_image, std::stringstream &tooltip) override
Setup item image and tooltip.
item_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 ...
config_array_view child_range(config_key_type key) const
Wrapper class to encapsulate creation and management of an SDL_Texture.
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.