Ejemplo n.º 1
0
void Menu::Update(float timeStep)
{
    Button::Update(timeStep);

    if (popup_ && showPopup_)
    {
        const Vector<SharedPtr<UIElement> >& children = popup_->GetChildren();
        for (unsigned i = 0; i < children.Size(); ++i)
        {
            Menu* menu = dynamic_cast<Menu*>(children[i].Get());
            if (menu && !menu->autoPopup_ && !menu->IsHovering())
                menu->autoPopup_ = true;
        }
    }
}