diff options
| author | Joaquim <joaquim.org@gmail.com> | 2021-04-04 03:08:51 +0100 |
|---|---|---|
| committer | Joaquim <joaquim.org@gmail.com> | 2021-04-04 03:08:51 +0100 |
| commit | 1d3742e14f09316a1d795527713eb8f9742f0ffb (patch) | |
| tree | 6bc6343538506b68256aa057121e063d22f8ed1a /src/displayapp/screens/Paddle.cpp | |
| parent | 58a2d000c4d49d96121894d6dd6bb861d7564bea (diff) | |
Big UI and navigation Rewrite
new navigation
add some color to the apps
redesign menus
new settings menu
new quick settings
code clean up
size reduction by converting navigation images to font
and more...
Diffstat (limited to 'src/displayapp/screens/Paddle.cpp')
| -rw-r--r-- | src/displayapp/screens/Paddle.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp index eda06547..e86cf01b 100644 --- a/src/displayapp/screens/Paddle.cpp +++ b/src/displayapp/screens/Paddle.cpp @@ -103,7 +103,8 @@ Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::Li app->SetTouchMode(DisplayApp::TouchModes::Polling); points = lv_label_create(lv_scr_act(), nullptr); - lv_label_set_text(points, "0"); + lv_label_set_text(points, "0000"); + lv_obj_set_style_local_text_color(points, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x444444)); lv_obj_align(points, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 0, 0); paddle.header.always_zero = 0; @@ -164,18 +165,12 @@ bool Paddle::Refresh() { ballX = 107; ballY = 107; score = 0; - } - sprintf(scoreStr, "%d", score); - lv_label_set_text(points, scoreStr); + } + lv_label_set_text_fmt(points, "%04d", score); } return running; } -bool Paddle::OnButtonPushed() { - running = false; - return true; -} - bool Paddle::OnTouchEvent(Pinetime::Applications::TouchEvents event) { return true; } |
