dEngine
Simple 2D C++ game engine
|
UI window Meant to be a collection of related UIComponents to display at the same time. This can be a menu, a HUD, or anything else where you want multiple elements displayed at once. This will then be "Pushed" to the UI to be displayed. See the code example below for a quick reference on how to use the UIWindow with UIComponent and the UI. More...
#include <UIWindow.h>
Public Member Functions | |
void | Push (UIComponent *) |
Push a component onto the stack. More... | |
void | Pop () |
Pop a UI element from the stack. More... | |
virtual void | Render () |
Render function. More... | |
virtual void | Update () |
Update function. More... | |
Private Attributes | |
std::vector< class UIComponent * > | components |
UI window Meant to be a collection of related UIComponents to display at the same time. This can be a menu, a HUD, or anything else where you want multiple elements displayed at once. This will then be "Pushed" to the UI to be displayed. See the code example below for a quick reference on how to use the UIWindow with UIComponent and the UI.
void UIWindow::Pop | ( | ) |
Pop a UI element from the stack.
Removes the last UIComponent added from the stack
void UIWindow::Push | ( | UIComponent * | component | ) |
Push a component onto the stack.
Adds a new UIComponent to the stack. The stack is a FILO system and as such the last component added will be draw on top. If you layer UIComponents be mindful of the order they are pushed.
|
virtual |
Render function.
Renders all components on the stack
|
virtual |
Update function.
Update all components on the stack
|
private |