bn::iregular_bg_cached_animate_action class

Base class of bn::regular_bg_cached_animate_action.

Can be used as a reference type for all bn::regular_bg_cached_animate_action objects.

Derived classes

template<int MaxSize>
class regular_bg_cached_animate_action
Changes the map of a regular_bg_ptr when the action is updated a given number of times.

Public functions

auto operator=(const iregular_bg_cached_animate_action& other) -> iregular_bg_cached_animate_action&
Copy assignment operator.
auto operator=(iregular_bg_cached_animate_action&& other) -> iregular_bg_cached_animate_action& noexcept
Move assignment operator.
void update()
Changes the map of the given regular_bg_ptr when the given amount of update calls are done.
auto done() const -> bool
Indicates if the action must not be updated anymore.
void reset()
Resets the action to its initial state.
auto regular_bg() const -> const regular_bg_ptr&
Returns the regular_bg_ptr to modify.
auto wait_updates() const -> int
Returns the number of times the action must be updated before changing the map of the given regular_bg_ptr.
void set_wait_updates(int wait_updates)
Sets the number of times the action must be updated before changing the map of the given regular_bg_ptr.
auto next_change_updates() const -> int
Returns the number of times the action must be updated before the next map change.
void set_next_change_updates(int next_change_updates)
Sets the number of times the action must be updated before the next map change.
auto maps() const -> const ivector<regular_bg_map_ptr>&
Returns the maps to use by the given regular_bg_ptr.
auto update_forever() const -> bool
Indicates if the action can be updated forever or not.
void set_update_forever(bool forever)
Specifies if the action must be updated forever or not.
auto current_index() const -> int
Returns the current index of the given maps.
void set_current_index(int current_index)
Sets the current index of the given maps.
void set_current_index(int current_index, bool update_bg_now)
Sets the current index of the given maps.
auto current_map() const -> const regular_bg_map_ptr&
Returns the current map.

Function documentation

iregular_bg_cached_animate_action& bn::iregular_bg_cached_animate_action::operator=(const iregular_bg_cached_animate_action& other)

Copy assignment operator.

Parameters
other iregular_bg_cached_animate_action to copy.
Returns Reference to this.

iregular_bg_cached_animate_action& bn::iregular_bg_cached_animate_action::operator=(iregular_bg_cached_animate_action&& other) noexcept

Move assignment operator.

Parameters
other iregular_bg_cached_animate_action to move.
Returns Reference to this.

int bn::iregular_bg_cached_animate_action::current_index() const

Returns the current index of the given maps.

This index is the one to be used on the next map change. It can be out of bounds if the action is done.

void bn::iregular_bg_cached_animate_action::set_current_index(int current_index, bool update_bg_now)

Sets the current index of the given maps.

Parameters
current_index New index of the given maps.
update_bg_now Specifies if the background must be updated now or on the next map change.

const regular_bg_map_ptr& bn::iregular_bg_cached_animate_action::current_map() const

Returns the current map.

This map is the one to be used on the next map change.