2019-12-23 19:56:33 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <random>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Animation.h"
|
|
|
|
|
|
|
|
#include "Bitmap.h"
|
|
|
|
|
|
|
|
class ImageScrollerAnimation : public Animation
|
|
|
|
{
|
|
|
|
public:
|
2019-12-24 17:29:30 +01:00
|
|
|
ImageScrollerAnimation(Fader *fader, Bitmap *image, uint32_t interval = 3, bool finish_scrolling = false);
|
2019-12-23 19:56:33 +01:00
|
|
|
|
|
|
|
void loop(uint64_t frame) override;
|
|
|
|
|
|
|
|
void stop(void) override
|
|
|
|
{
|
|
|
|
m_stopping = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void reset(void) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Bitmap m_image;
|
|
|
|
|
|
|
|
int32_t m_startIdx;
|
|
|
|
uint32_t m_interval;
|
|
|
|
|
2019-12-24 17:29:30 +01:00
|
|
|
bool m_finishScrolling;
|
|
|
|
|
2019-12-23 19:56:33 +01:00
|
|
|
bool m_stopping;
|
|
|
|
};
|