21 #define GETTEXT_DOMAIN "wesnoth-editor"
33 auto undo = std::make_unique<editor_action_item_delete>(loc_);
34 perform_without_undo(mc);
76 auto undo = std::make_unique<editor_action_item_replace>(new_loc_, loc_);
78 perform_without_undo(mc);
110 auto undo = std::make_unique<editor_action_item_move_all>(-x_offset_, -y_offset_);
111 perform_without_undo(mc);
118 decltype(ovls) new_overlays_map;
119 for (
auto ov: ovls) {
121 new_overlays_map.emplace(new_loc, ov.second);
130 auto undo = std::make_unique<editor_action_item_facing>(loc_, old_direction_, new_direction_);
131 perform_without_undo(mc);
#define IMPLEMENT_ACTION(id)
Helper macro to implement common action methods.
Remove a item from the map.
void perform_without_undo(map_context &mc) const override
Perform the action without creating an undo action.
void perform_without_undo(map_context &mc) const override
Perform the action without creating an undo action.
void perform_without_undo(map_context &mc) const override
Perform the action without creating an undo action.
void perform_without_undo(map_context &mc) const override
Perform the action without creating an undo action.
place a new item on the map
void perform_without_undo(map_context &mc) const override
Perform the action without creating an undo action.
Base class for all editor actions.
This class wraps around a map to provide a concise interface for the editor to work with.
overlay_map & get_overlays()
void set_overlays(overlay_map overlays)
Manage the empty-palette in the editor.
Encapsulates the map of the game.