2019-09-25 16:11:03 +00:00
|
|
|
#pragma once
|
2019-05-29 22:49:54 +00:00
|
|
|
|
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-10-01 04:29:32 +00:00
|
|
|
virtual void loop(uint16_t ms) = 0;
|
2019-09-25 16:11:03 +00:00
|
|
|
virtual String get_name() = 0;
|
2019-05-29 22:49:54 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|