16 #define GETTEXT_DOMAIN "wesnoth-editor"
37 std::set<map_location> adjacent_set;
39 adjacent_set.insert(adj);
82 if (!
click_)
return nullptr;
120 if (
click_)
return nullptr;
131 return std::make_unique<editor_action_item_replace>(
start_hex_, hex);
void remove_overlay(const map_location &loc)
remove_overlay will remove all overlays on a tile.
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
void add_overlay(const map_location &loc, overlay &&ov)
Functions to add and remove overlays from locations.
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...
Base class for all editor actions.
void set_mouseover_hex_overlay(const texture &image)
Sets texture to be drawn in hex under the mouse's location.
const editor_map & get_map() const
const Item & selected_fg_item() const
Return the currently selected foreground/background item.
std::unique_ptr< editor_action > drag_left(editor_display &disp, int x, int y, bool &partial, editor_action *last_undo) override
Drag operation.
void set_item_mouse_overlay(editor_display &disp, const overlay &u)
std::unique_ptr< editor_action > click_left(editor_display &disp, int x, int y) override
Left clicking places the currently selected item on the x,y map hex.
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.
std::unique_ptr< editor_action > click_right(editor_display &disp, int x, int y) override
Right clicking removes the item on the x,y map hex.
virtual void set_mouse_overlay(editor_display &disp) override
Set the mouse overlay for this action.
std::unique_ptr< editor_action > up_left(editor_display &disp, int x, int y) override
TODO.
item_palette & item_palette_
void move(editor_display &disp, const map_location &hex) override
Mouse move (not a drag).
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.
map_location previous_move_hex_
The hex previously used in move operations.
bool on_board(const map_location &loc) const
Tell if a location is on the map.
void get_adjacent_tiles(const map_location &a, map_location *res)
Function which, given a location, will place all adjacent locations in res.
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.
Encapsulates the map of the game.