Add ability for Screen Manager to display screens and retain others underneath in a stack fasion.
23 lines
No EOL
407 B
C++
23 lines
No EOL
407 B
C++
#pragma once
|
|
|
|
#include "ScreenBase.hpp"
|
|
#include <memory>
|
|
#include <stack>
|
|
|
|
namespace UI::Screen {
|
|
|
|
class Manager {
|
|
public:
|
|
static Manager &getInstance();
|
|
|
|
void pushScreen(Screen::Base::Ptr aScreen);
|
|
void pushScreen(Screen::Base::Ptr aScreen, lv_scr_load_anim_t aPushAnimation);
|
|
|
|
private:
|
|
Manager();
|
|
static Manager mManager;
|
|
|
|
std::stack<Screen::Base::Ptr> mScreens;
|
|
};
|
|
|
|
} // namespace UI::Screen
|