InfiniTime/src/displayapp/screens/InfiniPaint.h

38 lines
962 B
C
Raw Normal View History

2020-08-21 05:55:59 -04:00
#pragma once
2020-11-15 10:49:36 -05:00
#include <lvgl/lvgl.h>
2020-08-21 05:55:59 -04:00
#include <cstdint>
#include "Screen.h"
#include "components/motor/MotorController.h"
2020-08-21 05:55:59 -04:00
namespace Pinetime {
2020-11-15 10:49:36 -05:00
namespace Components {
class LittleVgl;
}
2020-08-21 05:55:59 -04:00
namespace Applications {
namespace Screens {
2020-11-15 10:49:36 -05:00
2020-10-09 04:35:32 -04:00
class InfiniPaint : public Screen {
2021-04-24 05:00:45 -04:00
public:
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl, Controllers::MotorController& motor);
2020-11-15 10:49:36 -05:00
2020-10-09 04:35:32 -04:00
~InfiniPaint() override;
2020-11-15 10:49:36 -05:00
2020-10-09 04:35:32 -04:00
bool OnTouchEvent(TouchEvents event) override;
2020-11-15 10:49:36 -05:00
2020-10-09 04:35:32 -04:00
bool OnTouchEvent(uint16_t x, uint16_t y) override;
2020-11-15 10:49:36 -05:00
2021-04-24 05:00:45 -04:00
private:
2020-10-09 04:35:32 -04:00
Pinetime::Components::LittleVgl& lvgl;
Controllers::MotorController& motor;
2020-10-09 04:35:32 -04:00
static constexpr uint16_t width = 10;
static constexpr uint16_t height = 10;
static constexpr uint16_t bufferSize = width * height;
lv_color_t b[bufferSize];
lv_color_t selectColor = LV_COLOR_WHITE;
uint8_t color = 3;
2020-08-21 05:55:59 -04:00
};
}
}
}