diff options
Diffstat (limited to 'src/displayapp/screens/settings/SettingWatchFace.h')
| -rw-r--r-- | src/displayapp/screens/settings/SettingWatchFace.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/displayapp/screens/settings/SettingWatchFace.h b/src/displayapp/screens/settings/SettingWatchFace.h index 45a50e3d..66559c73 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.h +++ b/src/displayapp/screens/settings/SettingWatchFace.h @@ -19,7 +19,10 @@ namespace Pinetime { class SettingWatchFace : public Screen { public: - SettingWatchFace(DisplayApp* app, Pinetime::Controllers::Settings& settingsController, Pinetime::Controllers::FS& filesystem); + SettingWatchFace(DisplayApp* app, + std::array<Screens::CheckboxList::Item, UserWatchFaceTypes::Count>&& watchfaceItems, + Pinetime::Controllers::Settings& settingsController, + Pinetime::Controllers::FS& filesystem); ~SettingWatchFace() override; bool OnTouchEvent(TouchEvents event) override; @@ -29,26 +32,16 @@ namespace Pinetime { auto CreateScreenList() const; std::unique_ptr<Screen> CreateScreen(unsigned int screenNum) const; + static constexpr int settingsPerScreen = 4; + std::array<Screens::CheckboxList::Item, UserWatchFaceTypes::Count> watchfaceItems; + static constexpr int nScreens = UserWatchFaceTypes::Count > 0 ? (UserWatchFaceTypes ::Count - 1) / settingsPerScreen + 1 : 1; + Controllers::Settings& settingsController; Pinetime::Controllers::FS& filesystem; static constexpr const char* title = "Watch face"; static constexpr const char* symbol = Symbols::home; - static constexpr int settingsPerScreen = 4; - - // Increment this when more space is needed - static constexpr int nScreens = 2; - - std::array<Screens::CheckboxList::Item, settingsPerScreen * nScreens> watchfaces { - {{"Digital face", true}, - {"Analog face", true}, - {"PineTimeStyle", true}, - {"Terminal", true}, - {"Infineat face", Applications::Screens::WatchFaceInfineat::IsAvailable(filesystem)}, - {"Casio G7710", Applications::Screens::WatchFaceCasioStyleG7710::IsAvailable(filesystem)}, - {"", false}, - {"", false}}}; ScreenList<nScreens> screens; }; } |
