updated gui
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user