#pragma once #include "Effect.h" #include "prototypes.h" class SimpleEffect : public Effect { protected: Window* window = &Window::window_full; // Use a full screen window per default. boolean _fade_out = false; boolean _random_colors = false; boolean _cycle_color = true; uint8_t _color = 0; String _name; simple_effect_t _method; public: SimpleEffect(String name, simple_effect_t method): _name { name }, _method { method } {}; SimpleEffect* with_fadeout() { _fade_out=true; return this;} SimpleEffect* with_random_colors() { _random_colors=true; return this;} SimpleEffect* with_static_color(uint8_t color) { _cycle_color=false; _color=color; return this; } void loop(uint16_t ms) override; String get_name() { return _name; }; boolean can_be_shown_with_clock() { return true; } };