Thomas Kolb
ae2eb2a25f
Waiting until the text has scrolled by completely is still possible, but must be activated on object construction by a special argument.
34 lines
597 B
C++
34 lines
597 B
C++
#pragma once
|
|
|
|
#include <random>
|
|
#include <vector>
|
|
|
|
#include "Animation.h"
|
|
|
|
#include "Bitmap.h"
|
|
|
|
class ImageScrollerAnimation : public Animation
|
|
{
|
|
public:
|
|
ImageScrollerAnimation(Fader *fader, Bitmap *image, uint32_t interval = 3, bool finish_scrolling = false);
|
|
|
|
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;
|
|
|
|
bool m_finishScrolling;
|
|
|
|
bool m_stopping;
|
|
};
|