65 inline static bool _isDrawing =
false;
66 inline static std::vector<std::function<void()>> _deferredUnloads;
99 const std::string& title,
120 static bool isDrawing() {
return _isDrawing; }
121 static void deferUnload(std::function<
void()> op)
123 _deferredUnloads.push_back(std::move(op));
128 void fireInputEvents(
const std::optional<sf::Event>& event)
override;
130 void draw()
override;
Architecture
Architectural style hint passed at construction.
@ EDA
Event-Driven Architecture.
@ ECS
Entity-Component-System.
@ MVC
Model-View-Controller.
void run() override
Enter the main loop and run until the window is closed.
AppManager(const sf::VideoMode &videoMode, const std::string &title, UIController &appLogic, sf::RenderWindow &window=WindowManager::getWindow(), Architecture architecture=MVC)
Construct an AppManager with an explicit controller and window.
virtual ~AppManager()=default
Abstract base class for all Malena managers.
virtual void fireUpdateEvents()=0
Fire the per-frame update event across all subscribers.
virtual void draw()=0
Render the subsystem's visual output to the window.
Concrete Controller base with a per-frame update hook.
sf::RenderWindow & getWindow()
Return the framework's shared sf::RenderWindow.