16 #define GETTEXT_DOMAIN "wesnoth-editor" 36 std::set<map_location> adjacent_set;
38 adjacent_set.insert(adj);
69 if (!
click_)
return nullptr;
107 if (
click_)
return nullptr;
118 return std::make_unique<editor_action_item_replace>(
start_hex_, hex);
130 std::stringstream filename;
surface get_image(const image::locator &i_locator, TYPE type)
Caches and returns an image.
map_location previous_move_hex_
The hex previously used in move operations.
void get_adjacent_tiles(const map_location &a, map_location *res)
Function which, given a location, will place all adjacent locations in res.
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
const map_location hex_clicked_on(int x, int y) const
given x,y co-ordinates of an onscreen pixel, will return the location of the hex that this pixel corr...
static double get_zoom_factor()
Returns the current zoom factor.
void move(editor_display &disp, const map_location &hex) override
Mouse move (not a drag).
std::unique_ptr< editor_action > up_left(editor_display &disp, int x, int y) override
TODO.
surface scale_surface(const surface &surf, int w, int h)
Scale a surface using alpha-weighted modified bilinear filtering Note: causes artifacts with alpha gr...
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
std::unique_ptr< editor_action > drag_end_left(editor_display &disp, int x, int y) override
Drag end replaces the item when clicked left, or adjusts the facing when clicked right.
void update_brush_highlights(editor_display &disp, const map_location &hex)
Unconditionally update the brush highlights for the current tool when hex is the center location...
std::unique_ptr< editor_action > drag_left(editor_display &disp, int x, int y, bool &partial, editor_action *last_undo) override
Drag operation.
item_palette & item_palette_
void add_overlay(const map_location &loc, const std::string &image, const std::string &halo="", const std::string &team_name="", const std::string &item_id="", bool visible_under_fog=true, float z_order=0)
Functions to add and remove overlays from locations.
void set_mouseover_hex_overlay(const surface &image)
mouseover_hex_overlay_ require a prerendered surface and is drawn underneath the mouse's location ...
Manage the empty-palette in the editor.
Encapsulates the map of the game.
void set_item_mouse_overlay(editor_display &disp, const overlay &u)
Base class for all editor actions.
bool on_board(const map_location &loc) const
Tell if a location is on the map.
const gamemap & get_map() const
const Item & selected_fg_item() const
Return the currently selected foreground/background item.
Functions to load and save images from/to disk.
void adjust_surface_alpha(surface &surf, int32_t amount)
virtual void set_mouse_overlay(editor_display &disp) override
Set the mouse overlay for this action.
std::unique_ptr< editor_action > click_left(editor_display &disp, int x, int y) override
TODO.
std::pair< std::string, unsigned > item