Watch face selection at build time
Watch faces can now be selected at buid time. It's implemented in a similar way than the selection of user apps, using a list of watch face description that is generated at build time (consteval, constexpr)
This commit is contained in:
parent
a544da9ed1
commit
39bc166e54
16 changed files with 216 additions and 259 deletions
|
|
@ -88,5 +88,23 @@ namespace Pinetime {
|
|||
lv_task_t* taskRefresh;
|
||||
};
|
||||
}
|
||||
|
||||
template <>
|
||||
struct WatchFaceTraits<WatchFace::Analog> {
|
||||
static constexpr WatchFace watchFace = WatchFace::Analog;
|
||||
static constexpr const char* name = "Analog face";
|
||||
|
||||
static Screens::Screen* Create(AppControllers& controllers) {
|
||||
return new Screens::WatchFaceAnalog(controllers.dateTimeController,
|
||||
controllers.batteryController,
|
||||
controllers.bleController,
|
||||
controllers.notificationManager,
|
||||
controllers.settingsController);
|
||||
};
|
||||
|
||||
static bool IsAvailable(Pinetime::Controllers::FS& /*filesystem*/) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue