Window ownership and access helpers. More...
Functions | |
| sf::RenderWindow & | ml::WindowManager::getWindow () |
Return the framework's shared sf::RenderWindow. | |
Window ownership and access helpers.
|
inline |
Return the framework's shared sf::RenderWindow.
WindowManager provides a single, lazily-created sf::RenderWindow that is shared across the entire Malena framework. Because the window is stored in a function-local static, it is created on the first call and lives for the duration of the program — no explicit construction or passing of a window pointer is needed.
AppManager, DrawableWrapper, and any other framework class that needs the window reference call this function rather than holding their own pointer, ensuring there is always exactly one window in a Malena application.
new and the pointer is stored in a local static. Do not call delete on the returned reference.sf::RenderWindow. Definition at line 45 of file WindowManager.h.