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