create in game interface panels and renable about and options windows

This commit is contained in:
Eduardo Bart
2011-11-03 07:59:11 -02:00
parent b05bb7818d
commit b345a6d783
30 changed files with 400 additions and 70 deletions

View File

@@ -82,13 +82,22 @@ void UIWidget::destroy()
}
void UIWidget::render()
{
renderSelf();
renderChildren();
}
void UIWidget::renderSelf()
{
// draw background
if(m_image) {
g_graphics.bindColor(m_backgroundColor);
m_image->draw(m_rect);
}
}
void UIWidget::renderChildren()
{
// draw children
for(const UIWidgetPtr& child : m_children) {
// render only visible children with a valid rect
@@ -191,6 +200,12 @@ void UIWidget::unlock()
parent->unlockChild(asUIWidget());
}
void UIWidget::focus()
{
if(UIWidgetPtr parent = getParent())
parent->focusChild(asUIWidget(), Fw::ActiveFocusReason);
}
bool UIWidget::isVisible()
{
if(!m_visible)