37 explicit arrow(
bool hidden =
false);
std::vector< map_location > arrow_path_t
Arrows destined to be drawn on the map.
static void invalidate_arrow_path(const arrow_path_t &path)
Invalidates every hex along the given path.
static const std::string STYLE_FOCUS_INVALID
void hide()
Sets the arrow's visibility.
void set_style(const std::string &style)
std::map< map_location, image::locator > arrow_symbols_map_t
arrow_path_t previous_path_
static const std::string STYLE_FOCUS
arrow & operator=(const arrow &)=delete
bool path_contains(const map_location &hex) const
std::string get_color() const
void reset()
invalidates and clears the present path, forgets the previous path, clears the symbols map
static const std::string STYLE_STANDARD
If you add more styles, you should look at move::update_arrow_style()
static const std::string STYLE_HIGHLIGHTED
std::string style_
represents the subdirectory that holds images for this arrow style
void update_symbols()
Calculate the symbols to place along the arrow path.
const arrow_path_t & get_previous_path() const
void notify_arrow_changed()
std::string get_style() const
The style is simply the name of a subdirectory under images/arrows, that holds an alternate copy of t...
arrow(const arrow &)=delete
const arrow_path_t & get_path() const
void set_path(const arrow_path_t &path)
arrow_symbols_map_t symbols_map_
image::locator get_image_for_loc(const map_location &hex) const
void set_color(const std::string &color)
The string color parameter is in the same format expected by the image::locator modifiers parameter.
static bool valid_path(const arrow_path_t &path)
Checks that the path is not of length 0 or 1.
Generic locator abstracting the location of an image.
map_display and display: classes which take care of displaying the map and game-data on the screen.
Encapsulates the map of the game.