There are now global instances of Window which don't have to be created and deleted all the time.
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
#include "Window.h"
|
||||
#include "functions.h"
|
||||
|
||||
Window* Window::getFullWindow() {
|
||||
static Window win;
|
||||
return &win;
|
||||
}
|
||||
Window Window::window_full = Window();
|
||||
Window Window::window_with_clock = Window(0, 0, LED_WIDTH, LED_HEIGHT-6);
|
||||
Window Window::window_clock = Window(0, LED_HEIGHT-6, LED_WIDTH, 6);
|
||||
|
||||
void Window::setPixel(uint8_t x, uint8_t y, CRGB* color) {
|
||||
if (x>=this->width || y>=this->height) return;
|
||||
|
Reference in New Issue
Block a user