diff options
author | JF <JF002@users.noreply.github.com> | 2021-12-30 21:36:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-30 21:36:43 +0100 |
commit | 395590d2d8988f39f58f6054aab214b740a2760a (patch) | |
tree | 31fadad1080d6cb46347d1c3556fb5f0ac1750b5 /src/displayapp/screens/PineTimeStyle.h | |
parent | 5b7915b5c9474ba74f7d31eae5e62c5d4793b0f6 (diff) | |
parent | 6cf4a933b6323fc24a3b27ae55a3c12d31d6a841 (diff) |
Merge pull request #718 from kieranc/pts-settings
Integrate color picker into PineTimeStyle watchface
Diffstat (limited to 'src/displayapp/screens/PineTimeStyle.h')
-rw-r--r-- | src/displayapp/screens/PineTimeStyle.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/displayapp/screens/PineTimeStyle.h b/src/displayapp/screens/PineTimeStyle.h index 8382c53c..df8b7d5a 100644 --- a/src/displayapp/screens/PineTimeStyle.h +++ b/src/displayapp/screens/PineTimeStyle.h @@ -5,6 +5,7 @@ #include <cstdint> #include <memory> #include "displayapp/screens/Screen.h" +#include "displayapp/Colors.h" #include "components/datetime/DateTimeController.h" namespace Pinetime { @@ -30,8 +31,13 @@ namespace Pinetime { Controllers::MotionController& motionController); ~PineTimeStyle() override; + bool OnTouchEvent(TouchEvents event) override; + bool OnButtonPushed() override; + void Refresh() override; + void UpdateSelected(lv_obj_t *object, lv_event_t event); + private: char displayedChar[5]; @@ -39,6 +45,7 @@ namespace Pinetime { Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown; Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown; uint8_t currentDay = 0; + uint32_t savedTick = 0; DirtyValue<uint8_t> batteryPercentRemaining {}; DirtyValue<bool> isCharging {}; @@ -48,6 +55,18 @@ namespace Pinetime { DirtyValue<uint32_t> stepCount {}; DirtyValue<bool> notificationState {}; + static Pinetime::Controllers::Settings::Colors GetNext(Controllers::Settings::Colors color); + static Pinetime::Controllers::Settings::Colors GetPrevious(Controllers::Settings::Colors color); + + lv_obj_t* btnNextTime; + lv_obj_t* btnPrevTime; + lv_obj_t* btnNextBar; + lv_obj_t* btnPrevBar; + lv_obj_t* btnNextBG; + lv_obj_t* btnPrevBG; + lv_obj_t* btnReset; + lv_obj_t* btnRandom; + lv_obj_t* btnClose; lv_obj_t* timebar; lv_obj_t* sidebar; lv_obj_t* timeDD1; @@ -67,6 +86,8 @@ namespace Pinetime { lv_obj_t* calendarCrossBar2; lv_obj_t* notificationIcon; lv_obj_t* stepGauge; + lv_obj_t* btnSet; + lv_obj_t* lbl_btnSet; lv_color_t needle_colors[1]; Controllers::DateTime& dateTimeController; @@ -77,6 +98,7 @@ namespace Pinetime { Controllers::MotionController& motionController; void SetBatteryIcon(); + void CloseMenu(); void AlignIcons(); lv_task_t* taskRefresh; |