2021-04-04 03:08:51 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-09-20 15:13:46 +03:00
|
|
|
#include <array>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <lvgl/lvgl.h>
|
2021-04-04 03:08:51 +01:00
|
|
|
|
2022-03-06 13:32:06 +01:00
|
|
|
#include "displayapp/screens/ScreenList.h"
|
2021-12-03 21:39:18 +02:00
|
|
|
#include "components/settings/Settings.h"
|
|
|
|
#include "displayapp/screens/Screen.h"
|
2022-03-06 13:32:06 +01:00
|
|
|
#include "displayapp/screens/Symbols.h"
|
2022-10-13 21:24:58 +03:00
|
|
|
#include "displayapp/screens/CheckboxList.h"
|
|
|
|
#include "displayapp/screens/WatchFaceInfineat.h"
|
|
|
|
#include "displayapp/screens/WatchFaceCasioStyleG7710.h"
|
2021-12-03 21:39:18 +02:00
|
|
|
|
2021-04-04 03:08:51 +01:00
|
|
|
namespace Pinetime {
|
|
|
|
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
2021-04-18 20:28:14 +03:00
|
|
|
class SettingWatchFace : public Screen {
|
2021-04-24 12:00:45 +03:00
|
|
|
public:
|
2022-10-11 21:36:31 +02:00
|
|
|
SettingWatchFace(DisplayApp* app, Pinetime::Controllers::Settings& settingsController, Pinetime::Controllers::FS& filesystem);
|
2021-04-18 20:28:14 +03:00
|
|
|
~SettingWatchFace() override;
|
2021-04-04 03:08:51 +01:00
|
|
|
|
2022-03-06 13:32:06 +01:00
|
|
|
bool OnTouchEvent(TouchEvents event) override;
|
2021-04-04 03:08:51 +01:00
|
|
|
|
2021-04-24 12:00:45 +03:00
|
|
|
private:
|
2023-02-22 22:05:37 +02:00
|
|
|
DisplayApp* app;
|
2022-10-13 21:24:58 +03:00
|
|
|
auto CreateScreenList() const;
|
|
|
|
std::unique_ptr<Screen> CreateScreen(unsigned int screenNum) const;
|
|
|
|
|
2021-04-18 20:28:14 +03:00
|
|
|
Controllers::Settings& settingsController;
|
2022-10-11 21:36:31 +02:00
|
|
|
Pinetime::Controllers::FS& filesystem;
|
2021-09-20 15:13:46 +03:00
|
|
|
|
2022-03-06 13:32:06 +01:00
|
|
|
static constexpr const char* title = "Watch face";
|
|
|
|
static constexpr const char* symbol = Symbols::home;
|
2022-10-13 21:24:58 +03:00
|
|
|
|
|
|
|
static constexpr int settingsPerScreen = 4;
|
|
|
|
|
|
|
|
// Increment this when more space is needed
|
|
|
|
static constexpr int nScreens = 2;
|
|
|
|
|
|
|
|
std::array<Screens::CheckboxList::Item, settingsPerScreen * nScreens> watchfaces {
|
|
|
|
{{"Digital face", true},
|
|
|
|
{"Analog face", true},
|
|
|
|
{"PineTimeStyle", true},
|
|
|
|
{"Terminal", true},
|
|
|
|
{"Infineat face", Applications::Screens::WatchFaceInfineat::IsAvailable(filesystem)},
|
|
|
|
{"Casio G7710", Applications::Screens::WatchFaceCasioStyleG7710::IsAvailable(filesystem)},
|
|
|
|
{"", false},
|
|
|
|
{"", false}}};
|
|
|
|
ScreenList<nScreens> screens;
|
2021-04-04 03:08:51 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|