the effects to show animations that stay fluid independent of the current frame rate.
		
			
				
	
	
		
			23 lines
		
	
	
		
			579 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			579 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#pragma once
 | 
						|
 | 
						|
#include "Window.h"
 | 
						|
#include "config.h"
 | 
						|
#include <Arduino.h>
 | 
						|
 | 
						|
class Effect {
 | 
						|
protected:
 | 
						|
    Window* window = Window::getFullWindow(); // Use a full screen window per default.
 | 
						|
public:
 | 
						|
	virtual ~Effect() {};
 | 
						|
    virtual void loop(uint16_t ms) = 0;
 | 
						|
    virtual String get_name() = 0;
 | 
						|
    boolean supports_window = false;
 | 
						|
    virtual boolean can_be_shown_with_clock() { return false; };
 | 
						|
    virtual boolean clock_as_mask() { return false; };
 | 
						|
    void setWindow(Window* win) {
 | 
						|
        window = win;
 | 
						|
    };
 | 
						|
    virtual void apply_option(String key, String value) {};
 | 
						|
};
 | 
						|
 |