aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Paddle.h
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-04-26 21:29:48 +0100
committerJoaquim <joaquim.org@gmail.com>2021-04-26 21:29:48 +0100
commitcd0d85dff95bbc5f285d92eb78a642aab1ae4b8b (patch)
treefc568aa2516c8c64cc55eb0d08e9a929c11b454a /src/displayapp/screens/Paddle.h
parent5fc07a8df7d18d1fa9c4971f2c7b69ea68db559b (diff)
parenteedff2c06c292bda8dcb92fc04c67097fe72e22f (diff)
Merge branch 'develop' of
https://github.com/JF002/InfiniTime into StepsApp
Diffstat (limited to 'src/displayapp/screens/Paddle.h')
-rw-r--r--src/displayapp/screens/Paddle.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/displayapp/screens/Paddle.h b/src/displayapp/screens/Paddle.h
index 453d99ae..e133244f 100644
--- a/src/displayapp/screens/Paddle.h
+++ b/src/displayapp/screens/Paddle.h
@@ -11,39 +11,37 @@ namespace Pinetime {
namespace Applications {
namespace Screens {
- class Paddle : public Screen{
- public:
- Paddle(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
- ~Paddle() override;
+ class Paddle : public Screen {
+ public:
+ Paddle(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
+ ~Paddle() override;
- bool Refresh() override;
-
- bool OnTouchEvent(TouchEvents event) override;
- bool OnTouchEvent(uint16_t x, uint16_t y) override;
-
- private:
- Pinetime::Components::LittleVgl& lvgl;
-
- int paddleBottomY = 90; // bottom extreme of the paddle
- int paddleTopY = 150; //top extreme of the paddle
+ bool Refresh() override;
- int ballX = 107; // Initial x_coordinate for the ball (12px offset from the center to counteract the ball's 24px size)
- int ballY = 107; // Initial y_coordinate for the ball
+ bool OnTouchEvent(TouchEvents event) override;
+ bool OnTouchEvent(uint16_t x, uint16_t y) override;
- int dx = 2; // Velocity of the ball in the x_coordinate
- int dy = 3; // Velocity of the ball in the y_coordinate
+ private:
+ Pinetime::Components::LittleVgl& lvgl;
- int counter = 0; // init Frame refresh limit counter
- int score = 0;
+ int paddleBottomY = 90; // bottom extreme of the paddle
+ int paddleTopY = 150; // top extreme of the paddle
- lv_img_dsc_t paddle;
- lv_img_dsc_t ball;
+ int ballX = 107; // Initial x_coordinate for the ball (12px offset from the center to counteract the ball's 24px size)
+ int ballY = 107; // Initial y_coordinate for the ball
- lv_obj_t* points;
- lv_obj_t* paddle_image; // pointer to paddle image
- lv_obj_t* ball_image; // pointer to ball image
+ int dx = 2; // Velocity of the ball in the x_coordinate
+ int dy = 3; // Velocity of the ball in the y_coordinate
-
+ int counter = 0; // init Frame refresh limit counter
+ int score = 0;
+
+ lv_img_dsc_t paddle;
+ lv_img_dsc_t ball;
+
+ lv_obj_t* points;
+ lv_obj_t* paddle_image; // pointer to paddle image
+ lv_obj_t* ball_image; // pointer to ball image
};
}
}