14 #define GETTEXT_DOMAIN "wesnoth-editor" 32 :
display(nullptr,
std::shared_ptr<
wb::manager>(), reports_object, theme_cfg,
config())
34 , controller_(controller)
74 if (
map().in_selection(loc)) {
85 if (
map().on_board_with_border(loc)) {
86 if (
map().in_selection(loc)) {
TYPE
Used to specify the rendering format of images.
surface get_image(const image::locator &i_locator, TYPE type)
Caches and returns an image.
const editor_map & map() const
image::TYPE get_image_type(const map_location &loc) override
The editor uses different rules for terrain highlighting (e.g.
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
editor_controller & controller_
virtual overlay_map & get_overlays() override
Inherited from display.
Variant for storing WML attributes.
New lexcical_cast header.
void set_brush_locs(const std::set< map_location > &hexes)
map_location mouseoverHex_
To lexical_cast(From value)
Lexical cast converts one type to another.
The editor_controller class contains the mouse and keyboard event handling routines for the editor...
Same as SCALED_TO_HEX, but with Time of Day color tint applied.
Unit and team statistics.
overlay_map & get_overlays()
Object which defines a time of day with associated bonuses, image, sounds etc.
map_context & get_current_map_context() const
Image on the selected unit.
void draw_sidebar() override
Called near the end of a draw operation, derived classes can use this to render a specific sidebar...
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
void remove_brush_loc(const map_location &hex)
void pre_draw() override
Called near the beginning of each draw() call.
std::map< map_location, std::vector< overlay > > overlay_map
const time_of_day & get_time_of_day(int for_turn=0) const
Returns global time of day for the passed turn.
virtual const time_of_day & get_time_of_day(const map_location &loc=map_location::null_location()) const override
Inherited from display.
The brush class represents a single brush – a set of relative locations around a "hotspot"...
Manage the empty-palette in the editor.
Generic locator abstracting the location of an image.
Encapsulates the map of the game.
virtual const std::vector< team > & teams() const =0
std::string get_terrain_editor_string(const map_location &loc) const
void rebuild_terrain(const map_location &loc)
const tod_manager * get_time_manager() const
int get_location_y(const map_location &loc) const
const SDL_Rect & map_outside_area() const
Returns the available area for a map, this may differ from the above.
virtual void draw_hex(const map_location &loc)
Redraws a single gamemap location.
const SDL_Rect & get_clip_rect() override
Get the clipping rectangle for drawing.
std::set< map_location > brush_locations_
Definitions for the terrain builder.
config & add_child(config_key_type key)
void drawing_buffer_add(const drawing_layer layer, const map_location &loc, int x, int y, const surface &surf, const SDL_Rect &clip=SDL_Rect())
Add an item to the drawing buffer.
int get_location_x(const map_location &loc) const
Functions to get the on-screen positions of hexes.
const gamemap & get_map() const
Image rescaled to fit into a hexagonal tile according to the zoom settings.
const display_context * dc_
void add_brush_loc(const map_location &hex)
CVideo & video()
Gets the underlying screen object.
void draw_hex(const map_location &loc) override
Redraws a single gamemap location.
A config object defines a single node in a WML file, with access to child nodes.
void clear_screen()
Clear the screen contents.
const std::unique_ptr< terrain_builder > builder_
void refresh_report(const std::string &report_name, const config *new_cfg=nullptr)
Redraws the specified report (if anything has changed).
Same as TOD_COLORED, but also brightened.