Added AnimationEffect::Blinker to quickly create a blinking sprite effect from an image file.
This commit is contained in:
@ -11,12 +11,14 @@ private:
|
||||
const char* name;
|
||||
uint16_t xOffset;
|
||||
uint16_t yOffset;
|
||||
unsigned long _last_blink_at;
|
||||
uint16_t _blink_freq;
|
||||
public:
|
||||
AnimationEffect(const char* name) : AnimationEffect(name, 0x000000, 0, 0) {}
|
||||
AnimationEffect(const char* name, uint32_t bg_color) : AnimationEffect(name, bg_color, 0, 0) {}
|
||||
AnimationEffect(const char* name, uint32_t bg_color, int x, int y);
|
||||
AnimationEffect(const char* name, uint32_t bg_color=0x000000, int x=0, int y=0);
|
||||
static AnimationEffect* Blinker(const char* name, uint16_t interval, uint32_t color, uint32_t background_color=0x000000);
|
||||
~AnimationEffect();
|
||||
AnimationEffect* setFgColor(uint32_t c);
|
||||
AnimationEffect* setBlinkFrequency(uint16_t);
|
||||
void loop(uint16_t ms);
|
||||
String get_name() override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user