diff options
author | Jean-François Milants <jf@codingfield.com> | 2022-10-11 21:36:31 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2022-10-11 21:36:31 +0200 |
commit | eb0af22ecf66957b9341521990c49a6d1d5d70e3 (patch) | |
tree | 269d1925185cd8d10cd39eb86f23c1170e40548e /src/displayapp/screens/CheckboxList.h | |
parent | 8c7be1fbb1d172ffc5cf99ec2b013f11f35dc421 (diff) |
Watch face settings : disable watch faces that are not available (external resources are not installed).
Diffstat (limited to 'src/displayapp/screens/CheckboxList.h')
-rw-r--r-- | src/displayapp/screens/CheckboxList.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/displayapp/screens/CheckboxList.h b/src/displayapp/screens/CheckboxList.h index f9c3bae0..e9104bfb 100644 --- a/src/displayapp/screens/CheckboxList.h +++ b/src/displayapp/screens/CheckboxList.h @@ -14,6 +14,11 @@ namespace Pinetime { class CheckboxList : public Screen { public: static constexpr size_t MaxItems = 4; + struct Item { + const char* name; + bool enabled; + }; + CheckboxList(const uint8_t screenID, const uint8_t numScreens, DisplayApp* app, @@ -21,14 +26,14 @@ namespace Pinetime { const char* optionsSymbol, uint32_t originalValue, std::function<void(uint32_t)> OnValueChanged, - std::array<const char*, MaxItems> options); + std::array<Item, MaxItems> options); ~CheckboxList() override; void UpdateSelected(lv_obj_t* object, lv_event_t event); private: const uint8_t screenID; std::function<void(uint32_t)> OnValueChanged; - std::array<const char*, MaxItems> options; + std::array<Item, MaxItems> options; std::array<lv_obj_t*, MaxItems> cbOption; std::array<lv_point_t, 2> pageIndicatorBasePoints; std::array<lv_point_t, 2> pageIndicatorPoints; |