summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/settings/SettingWatchFace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/settings/SettingWatchFace.cpp')
-rw-r--r--src/displayapp/screens/settings/SettingWatchFace.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/displayapp/screens/settings/SettingWatchFace.cpp b/src/displayapp/screens/settings/SettingWatchFace.cpp
index 6d47f3a5..217f97b8 100644
--- a/src/displayapp/screens/settings/SettingWatchFace.cpp
+++ b/src/displayapp/screens/settings/SettingWatchFace.cpp
@@ -4,15 +4,20 @@
#include "displayapp/screens/CheckboxList.h"
#include "displayapp/screens/Screen.h"
#include "components/settings/Settings.h"
+#include "displayapp/screens/WatchFaceInfineat.h"
+#include "displayapp/screens/WatchFaceCasioStyleG7710.h"
using namespace Pinetime::Applications::Screens;
constexpr const char* SettingWatchFace::title;
constexpr const char* SettingWatchFace::symbol;
-SettingWatchFace::SettingWatchFace(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
+SettingWatchFace::SettingWatchFace(Pinetime::Applications::DisplayApp* app,
+ Pinetime::Controllers::Settings& settingsController,
+ Pinetime::Controllers::FS& filesystem)
: Screen(app),
settingsController {settingsController},
+ filesystem {filesystem},
screens {app,
0,
{[this]() -> std::unique_ptr<Screen> {
@@ -33,7 +38,8 @@ bool SettingWatchFace::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
}
std::unique_ptr<Screen> SettingWatchFace::CreateScreen1() {
- std::array<const char*, 4> watchfaces {"Digital face", "Analog face", "PineTimeStyle", "Terminal"};
+ std::array<Screens::CheckboxList::Item, 4> watchfaces {
+ {{"Digital face", true}, {"Analog face", true}, {"PineTimeStyle", true}, {"Terminal", true}}};
return std::make_unique<Screens::CheckboxList>(
0,
2,
@@ -49,7 +55,11 @@ std::unique_ptr<Screen> SettingWatchFace::CreateScreen1() {
}
std::unique_ptr<Screen> SettingWatchFace::CreateScreen2() {
- std::array<const char*, 4> watchfaces {"Infineat face", "Casio G7710", "", ""};
+ std::array<Screens::CheckboxList::Item, 4> watchfaces {
+ {{"Infineat face", Applications::Screens::WatchFaceInfineat::IsAvailable(filesystem)},
+ {"Casio G7710", Applications::Screens::WatchFaceCasioStyleG7710::IsAvailable(filesystem)},
+ {"", false},
+ {"", false}}};
return std::make_unique<Screens::CheckboxList>(
1,
2,