summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Paddle.h
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-04-26 19:10:11 (GMT)
committerGitHub <noreply@github.com>2021-04-26 19:10:11 (GMT)
commit4706c99db4c1e05f9dd90f152f2dea08d8f22ab2 (patch)
treecf2bea6d67e8d91a7d6222b8e0b55a0075575003 /src/displayapp/screens/Paddle.h
parente56ebb8bd621cc8838e86fa032d680a6e7a35ffc (diff)
parent69898545193a82f7d72c9f47c9d9de36167b157b (diff)
Merge pull request #293 from Avamander/patch-5
Reformatted all the files according to clang-format style
Diffstat (limited to 'src/displayapp/screens/Paddle.h')
-rw-r--r--src/displayapp/screens/Paddle.h64
1 files changed, 31 insertions, 33 deletions
diff --git a/src/displayapp/screens/Paddle.h b/src/displayapp/screens/Paddle.h
index 453d99a..e133244 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;
-
- 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
-
- 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
-
- 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
-
-
+ 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
+
+ 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
+
+ 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
};
}
}