render do main menu

This commit is contained in:
Eduardo Bart
2011-04-08 06:50:26 -03:00
parent 4c6d1269a0
commit 6e8df399c9
21 changed files with 243 additions and 61 deletions

View File

@@ -24,7 +24,7 @@
#include "uicontainer.h"
UIContainer g_gui;
UIContainerPtr g_gui(new UIContainer);
void UIContainer::addChild(UIElementPtr child)
{
@@ -60,7 +60,7 @@ void UIContainer::setRect(const Rect& rect)
{
// update children rect
for(auto it = m_children.begin(); it != m_children.end(); ++it) {
UIElementPtr child = (*it)->asUIElement();
const UIElementPtr& child = (*it);
// transforme child rect
Rect childRect = child->getRect();
@@ -94,6 +94,24 @@ void UIContainer::moveTo(const Point& pos)
}
void UIContainer::render()
{
for(auto it = m_children.begin(); it != m_children.end(); ++it) {
const UIElementPtr& child = (*it);
child->render();
}
}
void UIContainer::update(int ticks, int elapsedTicks)
{
}
bool UIContainer::onInputEvent(InputEvent* event)
{
return false;
}
void UIContainer::setActiveElement(UIElementPtr activeElement)
{