mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
update to optional apps
This commit updates the codebase to use the new interface for compile-time optional apps.
This commit is contained in:
parent
d356c400e9
commit
e6099835fb
|
@ -1,6 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/Apps.h"
|
||||
#include "displayapp/Controllers.h"
|
||||
#include "Symbols.h"
|
||||
|
||||
namespace {
|
||||
int64_t constexpr powi(int64_t base, uint8_t exponent) {
|
||||
|
@ -64,5 +67,14 @@ namespace Pinetime {
|
|||
Error error = Error::None;
|
||||
};
|
||||
}
|
||||
|
||||
template <>
|
||||
struct AppTraits<Apps::Calculator> {
|
||||
static constexpr Apps app = Apps::Calculator;
|
||||
static constexpr const char* icon = Screens::Symbols::calculator;
|
||||
static Screens::Screen* Create(AppControllers& controllers) {
|
||||
return new Screens::Calculator();
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue