44 auto chain = std::make_unique<editor_action_chain>();
46 chain->append_action(std::make_unique<editor_action_deselect>(hexes));
48 chain->append_action(std::make_unique<editor_action_select>(hexes));
std::set< map_location > affected_hexes(editor_display &disp, const map_location &hex)
The affected hexes of a brush action are the result of projecting the current brush on the mouseover ...
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
std::set< map_location > get_contiguous_terrain_tiles(const map_location &start) const
Get a contiguous set of tiles having the same terrain as the starting location.
std::unique_ptr< editor_action > click_perform_right(editor_display &disp, const std::set< map_location > &hexes) override
Right click/drag.
std::unique_ptr< editor_action > click_right(editor_display &disp, int x, int y) override
Right click does nothing for now.
std::set< map_location > affected_hexes(editor_display &disp, const map_location &hex) override
Overridden to allow special behavior based on modifier keys.
virtual void set_mouse_overlay(editor_display &disp) override
Set the mouse overlay for this action.
std::unique_ptr< editor_action > click_perform_left(editor_display &disp, const std::set< map_location > &hexes) override
Left click/drag selects.
std::unique_ptr< editor_action > key_event(editor_display &disp, const SDL_Event &e) override
Force a fake "move" event to update brush overlay on key event.
bool has_shift_modifier() const
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.
bool has_ctrl_modifier() const
map_location previous_move_hex_
The hex previously used in move operations.
virtual std::unique_ptr< editor_action > key_event(editor_display &disp, const SDL_Event &e)
Function called by the controller on a key event for the current mouse action.
Generic locator abstracting the location of an image.
Wrapper class to encapsulate creation and management of an SDL_Texture.
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.