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
@@ -489,10 +489,11 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
|
||||
currentScreen = std::make_unique<Screens::Settings>(this, settingsController);
|
||||
break;
|
||||
case Apps::SettingWatchFace: {
|
||||
std::array<Screens::CheckboxList::Item, UserWatchFaceTypes::Count> items;
|
||||
std::array<Screens::SettingWatchFace::Item, UserWatchFaceTypes::Count> items;
|
||||
int i = 0;
|
||||
for (const auto& userWatchFace : userWatchFaces) {
|
||||
items[i++] = Screens::CheckboxList::Item {userWatchFace.name, userWatchFace.isAvailable(controllers.filesystem)};
|
||||
items[i++] =
|
||||
Screens::SettingWatchFace::Item {userWatchFace.name, userWatchFace.watchFace, userWatchFace.isAvailable(controllers.filesystem)};
|
||||
}
|
||||
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, std::move(items), settingsController, filesystem);
|
||||
} break;
|
||||
|
Reference in New Issue
Block a user