There are now global instances of Window which don't have to be created and deleted all the time.

This commit is contained in:
2020-04-30 06:41:30 +02:00
parent 9de77349e8
commit 10be8ef7cc
20 changed files with 20 additions and 27 deletions

View File

@ -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;