mirror of
https://github.com/esphome/esphome.git
synced 2025-11-18 07:45:56 +00:00
Added support for setting the current animation frame (#3681)
This commit is contained in:
@@ -491,6 +491,12 @@ class Animation : public Image {
|
||||
void next_frame();
|
||||
void prev_frame();
|
||||
|
||||
/** Selects a specific frame within the animation.
|
||||
*
|
||||
* @param frame If possitive, advance to the frame. If negative, recede to that frame from the end frame.
|
||||
*/
|
||||
void set_frame(int frame);
|
||||
|
||||
protected:
|
||||
int current_frame_;
|
||||
int animation_frame_count_;
|
||||
|
||||
Reference in New Issue
Block a user