JNGL
Easy to use cross-platform 2D game library
|
Helper class to handle multiple instances of Widget. More...
#include <jngl/Container.hpp>
Public Member Functions | |
void | step () |
Calls Widget::step of every widget and removes the once which request it. | |
void | draw () const |
Calls Widget::draw of every widget. | |
Widget * | addWidget (std::unique_ptr< Widget >) |
Adds a Widget to the container (safe to call during Container::step) | |
template<class T , class... Args> | |
T * | addWidget (Args &&... args) |
The same as addWidget(std::unique_ptr<Widget>) but creates the Widget for you. | |
void | removeWidget (Widget *) |
Removes a Widget from the Container (safe to call during Container::step) | |
Helper class to handle multiple instances of Widget.
Definition at line 16 of file Container.hpp.
|
inline |
The same as addWidget(std::unique_ptr<Widget>) but creates the Widget for you.
Definition at line 28 of file Container.hpp.