renderbug-cpp/src/animations/SolidAnimation.h

22 lines
536 B
C++

#pragma once
#include <Figments.h>
#include "../sprites/Blob.h"
class SolidAnimation: public Figment {
private:
AnimatedNumber m_red, m_green, m_blue, m_changePct;
CRGB m_curColor;
CRGB m_prevColor;
static constexpr int blobCount = 20;
SpriteList<Blob, blobCount> m_blobs;
void randomize();
bool m_isRandom = false;
bool m_horizontal = false;
public:
SolidAnimation();
void handleEvent(const InputEvent& evt) override;
void loop() override;
void render(Display* dpy) const override;
};