diff options
author | Jean-François Milants <jf@codingfield.com> | 2022-09-11 14:59:49 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2022-09-11 14:59:49 +0200 |
commit | ada2c09581d2d13acfa5ce9a97671c0ec17863f1 (patch) | |
tree | 2f776adc59d0c63e403d2043cb8460e65d6c46fe /src/displayapp/screens/ApplicationList.h | |
parent | 18cff286c75f432095db4b188e0f9a8a9e2bd8e8 (diff) | |
parent | c9a5c3fa5c930a5939d3114a6c6b48570d61ca24 (diff) |
Merge branch 'develop' into infineat-external-resources
# Conflicts:
# src/displayapp/screens/Symbols.h
# src/displayapp/screens/settings/SettingWatchFace.cpp
# src/displayapp/screens/settings/SettingWatchFace.h
Diffstat (limited to 'src/displayapp/screens/ApplicationList.h')
-rw-r--r-- | src/displayapp/screens/ApplicationList.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h index f430a89e..e7c094bf 100644 --- a/src/displayapp/screens/ApplicationList.h +++ b/src/displayapp/screens/ApplicationList.h @@ -1,5 +1,6 @@ #pragma once +#include <array> #include <memory> #include "displayapp/screens/Screen.h" @@ -7,6 +8,8 @@ #include "components/datetime/DateTimeController.h" #include "components/settings/Settings.h" #include "components/battery/BatteryController.h" +#include "displayapp/screens/Symbols.h" +#include "displayapp/screens/Tile.h" namespace Pinetime { namespace Applications { @@ -16,19 +19,41 @@ namespace Pinetime { explicit ApplicationList(DisplayApp* app, Pinetime::Controllers::Settings& settingsController, Pinetime::Controllers::Battery& batteryController, + Pinetime::Controllers::Ble& bleController, Controllers::DateTime& dateTimeController); ~ApplicationList() override; bool OnTouchEvent(TouchEvents event) override; private: + auto CreateScreenList() const; + std::unique_ptr<Screen> CreateScreen(unsigned int screenNum) const; + Controllers::Settings& settingsController; Pinetime::Controllers::Battery& batteryController; + Pinetime::Controllers::Ble& bleController; Controllers::DateTime& dateTimeController; - ScreenList<2> screens; - std::unique_ptr<Screen> CreateScreen1(); - std::unique_ptr<Screen> CreateScreen2(); - // std::unique_ptr<Screen> CreateScreen3(); + static constexpr int appsPerScreen = 6; + + // Increment this when more space is needed + static constexpr int nScreens = 2; + + static constexpr std::array<Tile::Applications, appsPerScreen * nScreens> applications {{ + {Symbols::stopWatch, Apps::StopWatch}, + {Symbols::clock, Apps::Alarm}, + {Symbols::hourGlass, Apps::Timer}, + {Symbols::shoe, Apps::Steps}, + {Symbols::heartBeat, Apps::HeartRate}, + {Symbols::music, Apps::Music}, + + {Symbols::paintbrush, Apps::Paint}, + {Symbols::paddle, Apps::Paddle}, + {"2", Apps::Twos}, + {Symbols::chartLine, Apps::Motion}, + {Symbols::drum, Apps::Metronome}, + {Symbols::map, Apps::Navigation}, + }}; + ScreenList<nScreens> screens; }; } } |