diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-03-24 06:09:54 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-03-24 10:15:57 (GMT) |
| commit | 22bbf46a12c65275a14aeddb1941b0fec0eb0b5b (patch) | |
| tree | 08110be72491ac1c472c8a4dd6cd9e43d2b95053 /src/displayapp/screens/Paddle.h | |
| parent | 7d4592a8e95566b7e2d3adecef8ed0349905759f (diff) | |
sans paddle and analog watchface
Diffstat (limited to 'src/displayapp/screens/Paddle.h')
| -rw-r--r-- | src/displayapp/screens/Paddle.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/displayapp/screens/Paddle.h b/src/displayapp/screens/Paddle.h deleted file mode 100644 index 3a30eee..0000000 --- a/src/displayapp/screens/Paddle.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include <lvgl/lvgl.h> -#include <cstdint> -#include "displayapp/screens/Screen.h" - -namespace Pinetime { - namespace Components { - class LittleVgl; - } - namespace Applications { - namespace Screens { - - class Paddle : public Screen { - public: - Paddle(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl); - ~Paddle() override; - - void Refresh() override; - - bool OnTouchEvent(TouchEvents event) override; - bool OnTouchEvent(uint16_t x, uint16_t y) override; - - private: - Pinetime::Components::LittleVgl& lvgl; - - const uint8_t ballSize = 16; - - uint16_t paddlePos = 30; // Paddle center - - int16_t ballX = (LV_HOR_RES - ballSize) / 2; - int16_t ballY = (LV_VER_RES - ballSize) / 2; - - int8_t dx = 2; // Velocity of the ball in the x_coordinate - int8_t dy = 3; // Velocity of the ball in the y_coordinate - - uint16_t score = 0; - - lv_obj_t* points; - lv_obj_t* paddle; - lv_obj_t* ball; - lv_obj_t* background; - - lv_task_t* taskRefresh; - }; - } - } -} |
