Palette where the terrain to be drawn can be selected. More...
#include <terrain_palettes.hpp>


Public Member Functions | |
| terrain_palette (editor_display &gui, const size_specs &sizes, const config &cfg, mouse_action **active_mouse_action) | |
| const gamemap & | map () const |
| virtual void | setup (const config &cfg) |
| Setup the internal data structure. | |
Private Member Functions | |
| virtual void | select_bg_item (std::string item_id) |
| virtual const std::string & | get_id (const t_translation::t_terrain &terrain) |
| virtual void | draw_item (SDL_Rect &dstrect, const t_translation::t_terrain &terrain, std::stringstream &tooltip_text) |
| virtual void | update_report () |
| std::string | get_terrain_string (const t_translation::t_terrain) |
| Return a string representing the terrain and the underlying ones. | |
Palette where the terrain to be drawn can be selected.
Definition at line 39 of file terrain_palettes.hpp.
| editor::terrain_palette::terrain_palette | ( | editor_display & | gui, | |
| const size_specs & | sizes, | |||
| const config & | cfg, | |||
| mouse_action ** | active_mouse_action | |||
| ) |
Definition at line 207 of file terrain_palettes.cpp.
| void editor::terrain_palette::draw_item | ( | SDL_Rect & | dstrect, | |
| const t_translation::t_terrain & | terrain, | |||
| std::stringstream & | tooltip_text | |||
| ) | [private, virtual] |
Implements editor::editor_palette< t_translation::t_terrain >.
Definition at line 153 of file terrain_palettes.cpp.
References surface::assign(), terrain_type::default_base(), terrain_type::editor_image(), ERR_ED, display::get_draw_terrain_codes(), image::get_image(), gamemap::get_terrain_editor_string(), gamemap::get_terrain_info(), CVideo::getSurface(), editor::editor_palette< t_translation::t_terrain >::gui_, editor::editor_palette< t_translation::t_terrain >::item_size_, map(), game_config::images::missing, t_translation::NONE_TERRAIN, scale_surface(), resources::screen, sdl_blit(), utils::unicode_em_dash, and display::video().

| const std::string & editor::terrain_palette::get_id | ( | const t_translation::t_terrain & | terrain | ) | [private, virtual] |
Implements editor::editor_palette< t_translation::t_terrain >.
Definition at line 215 of file terrain_palettes.cpp.
References gamemap::get_terrain_info(), terrain_type::id(), and map().
Referenced by setup().


| std::string editor::terrain_palette::get_terrain_string | ( | const t_translation::t_terrain | ) | [private] |
Return a string representing the terrain and the underlying ones.
| const gamemap& editor::terrain_palette::map | ( | ) | const [inline] |
Definition at line 45 of file terrain_palettes.hpp.
References display::get_map(), and editor::editor_palette< t_translation::t_terrain >::gui_.
Referenced by draw_item(), get_id(), setup(), and update_report().


| void editor::terrain_palette::select_bg_item | ( | std::string | item_id | ) | [private, virtual] |
Reimplemented from editor::editor_palette< t_translation::t_terrain >.
Definition at line 59 of file terrain_palettes.cpp.
References editor::editor_palette< t_translation::t_terrain >::selected_bg_item().
Referenced by setup().


| void editor::terrain_palette::setup | ( | const config & | cfg | ) | [virtual] |
Setup the internal data structure.
Implements editor::editor_palette< t_translation::t_terrain >.
Definition at line 64 of file terrain_palettes.cpp.
References editor::editor_palette< t_translation::t_terrain >::active_group(), config::child_range(), DBG_ED, terrain_type::editor_group(), terrain_type::editor_name(), ERR_ED, get_id(), gamemap::get_terrain_info(), gamemap::get_terrain_list(), editor::editor_palette< t_translation::t_terrain >::group_map_, editor::editor_palette< t_translation::t_terrain >::groups_, terrain_type::hide_in_editor(), editor::item_group::id, terrain_type::is_combined(), editor::editor_palette< t_translation::t_terrain >::item_map_, map(), terrain_type::name(), editor::editor_palette< t_translation::t_terrain >::nmax_items_, editor::editor_palette< t_translation::t_terrain >::non_core_items_, terrain_type::number(), select_bg_item(), editor::editor_palette< t_translation::t_terrain >::select_fg_item(), editor::editor_palette< t_translation::t_terrain >::set_group(), and utils::split().

| void editor::terrain_palette::update_report | ( | ) | [private, virtual] |
Definition at line 51 of file terrain_palettes.cpp.
References _, gamemap::get_terrain_editor_string(), map(), and editor::editor_palette< t_translation::t_terrain >::selected_fg_item().

| Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:03 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |