48 , exclusive_display_hexes_()
50 , selection_candidate_()
53 , secondary_highlights_()
111 if(act->is_numbering_hex(hex)) {
135 main->accept(hm_visitor);
164 main->accept(uh_visitor);
190 bool this_is_last_action = last_action != sa.
end() &&
move == *last_action;
191 bool last_action_has_fake_unit = last_action != sa.
end() && (*last_action)->get_fake_unit();
192 bool this_is_second_to_last_action = (second_to_last_action != sa.
end() &&
move == *second_to_last_action);
194 if(this_is_last_action || (this_is_second_to_last_action && !last_action_has_fake_unit)) {
238 return *
side_actions_->find_first_action_of(locked->get_unit_id());
246 return *
side_actions_->find_last_action_of(locked->get_unit_id());
285 visit(std::static_pointer_cast<move>(
attack));
308 highlighter_.exclusive_display_hexes_.insert(
move->
get_fake_unit()->get_location());
310 highlighter_.last_action_redraw(
move);
316 visit(std::static_pointer_cast<move>(
attack));
327 highlighter_.last_action_redraw(
move);
333 visit(std::static_pointer_cast<move>(
attack));
bool add_exclusive_draw(const map_location &loc, unit &unit)
Allows a unit to request to be the only one drawn in its hex.
std::string remove_exclusive_draw(const map_location &loc)
Cancels an exclusive draw request.
static display * get_singleton()
Returns the display object if a display object exists.
virtual const std::vector< team > & teams() const override
virtual const unit_map & units() const override
static game_display * get_singleton()
Container associating units to locations.
unit_iterator find(std::size_t id)
Abstract base class for all the whiteboard planned actions.
std::size_t team_index() const
Returns the index of the team that owns this action.
virtual void accept(visitor &v)=0
highlighter & highlighter_
side_actions_ptr side_actions_
void find_main_highlight()
std::set< map_location > exclusive_display_hexes_
action_ptr get_bump_target()
void last_action_redraw(move_ptr)
Redraw the given move action when needed.
secondary_highlights_t secondary_highlights_
unit_ptr selection_candidate_
action_ptr get_execute_target()
void set_mouseover_hex(const map_location &hex)
map_location mouseover_hex_
highlighter(side_actions_ptr side_actions)
unit_map & get_unit_map()
action_ptr get_delete_target()
weak_action_ptr selected_action_
unit_ptr get_selection_target()
void find_secondary_highlights()
weak_action_ptr main_highlight_
A planned move, represented on the map by an arrow and a ghosted unit in the destination hex.
virtual size_t get_unit_id() const
Returns the id of the unit targeted by this action.
void set_arrow_brightness(ARROW_BRIGHTNESS x) const
virtual fake_unit_ptr get_fake_unit()
virtual arrow_ptr get_arrow()
@ ARROW_BRIGHTNESS_STANDARD
@ ARROW_BRIGHTNESS_HIGHLIGHTED
virtual fake_unit_ptr get_fake_unit()
virtual fake_unit_ptr get_fake_unit()
This internal whiteboard class holds the planned action queues for a team, and offers many utility me...
iterator find_last_action_of(const unit &unit, iterator start_position)
Finds the last action that belongs to this unit, starting the search backwards from the specified pos...
iterator begin()
Returns the iterator for the first (executed earlier) action within the actions queue.
container::iterator iterator
iterator end()
Returns the iterator for the position after the last executed action within the actions queue.
void remove()
Removes a tip.
auto reversed_view(T &container)
std::shared_ptr< recruit > recruit_ptr
std::weak_ptr< action > weak_action_ptr
std::shared_ptr< move > move_ptr
std::shared_ptr< action > action_ptr
std::shared_ptr< attack > attack_ptr
action_ptr find_action_at(map_location hex, team_filter team_filter)
Find the first action occurring on a given hex.
std::shared_ptr< side_actions > side_actions_ptr
std::deque< action_ptr > find_actions_of(const unit &target)
Find the actions of an unit.
std::shared_ptr< recall > recall_ptr
std::shared_ptr< unit > unit_ptr
Encapsulates the map of the game.
pointer get_shared_ptr() const
This is exactly the same as operator-> but it's slightly more readable, and can replace &*iter syntax...
Ensures that the real unit map is active for the duration of the struct's life.