updated gui

This commit is contained in:
turanszkij
2016-05-28 00:15:36 +02:00
parent 97425a6ee9
commit c2fbca6ffe
5 changed files with 175 additions and 10 deletions
+14
View File
@@ -15,6 +15,15 @@ wiGUI::~wiGUI()
void wiGUI::Update()
{
if (activeWidget != nullptr)
{
if (!activeWidget->IsEnabled() || !activeWidget->IsVisible())
{
// deactivate active widget if it became invisible or disabled
DeactivateWidget(activeWidget);
}
}
for (auto&x : widgets)
{
x->Update(this);
@@ -34,6 +43,11 @@ void wiGUI::AddWidget(wiWidget* widget)
widgets.push_back(widget);
}
void wiGUI::RemoveWidget(wiWidget* widget)
{
widgets.remove(widget);
}
wiWidget* wiGUI::GetWidget(const wiHashString& name)
{
for (auto& x : widgets)