2019-05-29 22:49:54 +00:00
|
|
|
#ifndef Effect_H
|
|
|
|
#define Effect_H
|
|
|
|
|
2019-06-11 17:48:09 +00:00
|
|
|
#include "Window.h"
|
2019-05-29 22:49:54 +00:00
|
|
|
#include "config.h"
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
|
|
class Effect {
|
2019-06-07 04:24:16 +00:00
|
|
|
protected:
|
2019-06-11 17:48:09 +00:00
|
|
|
Window* window = Window::getFullWindow(); // Use a full screen window per default.
|
2019-06-07 04:24:16 +00:00
|
|
|
public:
|
2019-06-18 16:09:05 +00:00
|
|
|
virtual ~Effect() {};
|
2019-05-29 22:49:54 +00:00
|
|
|
virtual void loop() = 0;
|
|
|
|
boolean supports_window = false;
|
|
|
|
virtual boolean can_be_shown_with_clock() { return false; };
|
|
|
|
virtual boolean clock_as_mask() { return false; };
|
2019-06-11 17:48:09 +00:00
|
|
|
void setWindow(Window* win) {
|
2019-06-07 04:24:16 +00:00
|
|
|
window = win;
|
2019-05-29 22:49:54 +00:00
|
|
|
};
|
2019-06-19 20:28:38 +00:00
|
|
|
virtual void apply_option(String key, String value) {};
|
2019-05-29 22:49:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|