Watch face selection using CMake
The list of watch face to build into the firmware is now set by CMake (-DENABLE_WATCHFACES). Fix SettingWatchFace : convert to index to/from WatchFace when needed.
This commit is contained in:
committed by
JF
parent
12acef6a71
commit
22f6d4a40b
@@ -19,8 +19,14 @@ namespace Pinetime {
|
||||
|
||||
class SettingWatchFace : public Screen {
|
||||
public:
|
||||
struct Item {
|
||||
const char* name;
|
||||
WatchFace watchface;
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
SettingWatchFace(DisplayApp* app,
|
||||
std::array<Screens::CheckboxList::Item, UserWatchFaceTypes::Count>&& watchfaceItems,
|
||||
std::array<Item, UserWatchFaceTypes::Count>&& watchfaceItems,
|
||||
Pinetime::Controllers::Settings& settingsController,
|
||||
Pinetime::Controllers::FS& filesystem);
|
||||
~SettingWatchFace() override;
|
||||
@@ -33,7 +39,7 @@ namespace Pinetime {
|
||||
std::unique_ptr<Screen> CreateScreen(unsigned int screenNum) const;
|
||||
|
||||
static constexpr int settingsPerScreen = 4;
|
||||
std::array<Screens::CheckboxList::Item, UserWatchFaceTypes::Count> watchfaceItems;
|
||||
std::array<Item, UserWatchFaceTypes::Count> watchfaceItems;
|
||||
static constexpr int nScreens = UserWatchFaceTypes::Count > 0 ? (UserWatchFaceTypes ::Count - 1) / settingsPerScreen + 1 : 1;
|
||||
|
||||
Controllers::Settings& settingsController;
|
||||
|
||||
Reference in New Issue
Block a user