19 #define GETTEXT_DOMAIN "wesnoth-editor"
42 item_map_.insert(std::pair<std::string, overlay>(item[
"id"],
overlay(item)));
44 if (!
group[
"core"].to_bool(
false))
57 ERR_ED <<
"No items found." << std::endl;
64 std::stringstream filename;
65 filename << item.
image;
66 if (item.
image.empty())
67 filename << item.
halo;
70 if(image ==
nullptr) {
71 tooltip_text <<
"IMAGE NOT FOUND\n";
72 ERR_ED <<
"image for item type: '" << filename.str() <<
"' not found" << std::endl;
74 if (image ==
nullptr) {
75 ERR_ED <<
"Placeholder image not found" << std::endl;
85 tooltip_text << item.
name;
virtual void draw_item(const overlay &item, surface &image, std::stringstream &tooltip_text)
surface get_image(const image::locator &i_locator, TYPE type)
function to get the surface corresponding to an image.
child_itors child_range(const std::string &key)
const overlay & selected_fg_item() const
Return the currently selected foreground/background item.
item_palette(editor_display &gui, const config &cfg, mouse_action **active_mouse_action)
virtual void select_bg_item(const std::string &item_id)
virtual void select_fg_item(const std::string &item_id)
Select a foreground item.
Stores the info about the groups in a nice format.
virtual const std::string & get_id(const overlay &item)
virtual void setup(const config &cfg)
Setup the internal data structure.
const std::vector< std::string > & active_group()
surface scale_surface(const surface &surf, int w, int h)
std::map< std::string, std::vector< std::string > > group_map_
Manage the empty-palette in the editor.
std::set< std::string > non_core_items_
virtual std::string get_help_string()
this module manages the cache of images.
void assign(const surface &o)
std::vector< item_group > groups_
The editor_groups as defined in editor-groups.cfg.
A mouse action receives events from the controller, and responds to them by creating an appropriate e...
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
void set_group(size_t index)