16 #define GETTEXT_DOMAIN "wesnoth-editor"
38 std::set<map_location> adjacent_set;
40 adjacent_set.insert(adj);
70 if (!
click_)
return nullptr;
108 if (
click_)
return nullptr;
119 return std::make_unique<editor_action_item_replace>(
start_hex_, hex);
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...
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
const gamemap & get_map() const
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 submerge=0.0f, float z_order=0)
Functions to add and remove overlays from locations.
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 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
TODO.
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.
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.
std::pair< std::string, unsigned > item
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.