diff options
Diffstat (limited to 'src/displayapp/screens/ApplicationList.h')
| -rw-r--r-- | src/displayapp/screens/ApplicationList.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h index 27ebbac..50e7fcd 100644 --- a/src/displayapp/screens/ApplicationList.h +++ b/src/displayapp/screens/ApplicationList.h @@ -7,6 +7,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 { @@ -21,14 +23,32 @@ namespace Pinetime { 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; Controllers::DateTime& dateTimeController; - ScreenList<3> screens; - std::unique_ptr<Screen> CreateScreen1(); - std::unique_ptr<Screen> CreateScreen2(); - std::unique_ptr<Screen> CreateScreen3(); + static constexpr std::array<Tile::Applications, 13> applications {{ + {Symbols::music, Apps::Music}, + {Symbols::shoe, Apps::Steps}, + {Symbols::stopWatch, Apps::StopWatch}, + {Symbols::heartBeat, Apps::HeartRate}, + {Symbols::hourGlass, Apps::Timer}, + {Symbols::clock, Apps::Alarm}, + + {Symbols::chartLine, Apps::Jumpscore}, + {Symbols::map, Apps::Navigation}, + {Symbols::drum, Apps::Metronome}, + {Symbols::paintbrush, Apps::Paint}, + {Symbols::paddle, Apps::Paddle}, + {"2", Apps::Twos}, + + {Symbols::chartLine, Apps::Motion}, + }}; + static constexpr int nScreens = (applications.size() + 5) / 6; + ScreenList<nScreens> screens; }; } } |
