37 explicit arrow(
bool hidden =
false);
54 virtual void set_color(
const std::string& color);
std::vector< map_location > arrow_path_t
Arrows destined to be drawn on the map.
virtual std::string get_color() const
virtual void draw_hex(const map_location &hex)
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
virtual void reset()
invalidates and clears the present path, forgets the previous path, clears the symbols map
display::drawing_layer layer_
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
virtual void update_symbols()
Calculate the symbols to place along the arrow path.
const arrow_path_t & get_previous_path() const
virtual 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
virtual void set_path(const arrow_path_t &path)
arrow_symbols_map_t symbols_map_
virtual 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.
drawing_layer
The layers to render something on.
Encapsulates the map of the game.