diff options
author | JF002 <JF002@users.noreply.github.com> | 2021-06-12 21:01:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-12 21:01:55 +0200 |
commit | ab1a3900a377054bd67196f0ee5c748ea93d3e46 (patch) | |
tree | 907608958d0be8a97a3d646c842fde3095cef939 /src/displayapp/screens/ScreenList.h | |
parent | f2d01166c380b72ebcb13ef649def88ff4cf2d21 (diff) | |
parent | e90e8c7426f9a44e696b208a5b393a60476a3d43 (diff) |
Merge branch 'develop' into pinetimestyle
Diffstat (limited to 'src/displayapp/screens/ScreenList.h')
-rw-r--r-- | src/displayapp/screens/ScreenList.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/displayapp/screens/ScreenList.h b/src/displayapp/screens/ScreenList.h index 73ea4610..ea66bfb2 100644 --- a/src/displayapp/screens/ScreenList.h +++ b/src/displayapp/screens/ScreenList.h @@ -15,12 +15,17 @@ namespace Pinetime { public: ScreenList(DisplayApp* app, uint8_t initScreen, - std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens, + const std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens, ScreenListModes mode) - : Screen(app), initScreen {initScreen}, screens {std::move(screens)}, mode {mode}, current {this->screens[initScreen]()} { - screenIndex = initScreen; + : Screen(app), initScreen {initScreen}, screens {std::move(screens)}, mode {mode}, screenIndex{initScreen}, current {this->screens[initScreen]()} { + } + ScreenList(const ScreenList&) = delete; + ScreenList& operator=(const ScreenList&) = delete; + ScreenList(ScreenList&&) = delete; + ScreenList& operator=(ScreenList&&) = delete; + ~ScreenList() override { lv_obj_clean(lv_scr_act()); } @@ -97,7 +102,7 @@ namespace Pinetime { private: uint8_t initScreen = 0; - std::array<std::function<std::unique_ptr<Screen>()>, N> screens; + const std::array<std::function<std::unique_ptr<Screen>()>, N> screens; ScreenListModes mode = ScreenListModes::UpDown; uint8_t screenIndex = 0; |