20 const QPoint &activity_offset,
21 const QPoint &select_offset,
22 const QPoint &unit_offset,
23 const QPoint &unit_flag_offset);
28 std::vector<drawn_sprite>
31 const unit *punit)
const override;
54 const QPoint &full_offset)
const;
56 const QPoint &full_offset)
const;
An abstract class for layers that need sprites for unit activities.
QPixmap * m_action_decision_want
std::array< QPixmap *, MAX_VET_LEVELS > m_veteran_level
std::vector< QPixmap * > m_select
int & focus_unit_state()
Returns the current state of the focused unit animation.
virtual ~layer_units()=default
int m_focus_unit_state
State of the focused unit animation.
layer_units(struct tileset *ts, mapview_layer layer, const QPoint &activity_offset, const QPoint &select_offset, const QPoint &unit_offset, const QPoint &unit_flag_offset)
Constructor.
int focus_unit_state() const
Returns the current state of the focused unit animation.
std::vector< drawn_sprite > fill_sprite_array(const tile *ptile, const tile_edge *pedge, const tile_corner *pcorner, const unit *punit) const override
Returns the list of sprites drawn by this layer somewhere on the map.
void add_automated_sprite(std::vector< drawn_sprite > &sprs, const unit *punit, const QPoint &full_offset) const
Adds the sprite used to represent an automated unit on the map to sprs.
std::array< QPixmap *, MAX_NUM_BATTLEGROUPS > m_battlegroup
void load_sprites() override
Loads all static sprites needed by this layer (activities etc).
std::vector< QPixmap * > m_hp_bar
void add_orders_sprite(std::vector< drawn_sprite > &sprs, const unit *punit, const QPoint &full_offset) const
Adds the sprite used to represent unit orders to sprs.
QPoint m_unit_flag_offset
auto focus_unit_state_count() const
Returns the number of steps in the focused unit animation.
A layer when drawing the map.