metaforce/Runtime/GuiSys/CGuiCompoundWidget.cpp

46 lines
1.0 KiB
C++
Raw Normal View History

2016-03-16 03:37:51 +00:00
#include "CGuiCompoundWidget.hpp"
namespace urde
{
CGuiCompoundWidget::CGuiCompoundWidget(const CGuiWidgetParms& parms)
: CGuiWidget(parms)
{
}
void CGuiCompoundWidget::OnVisibleChange()
2016-03-16 03:37:51 +00:00
{
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
while (child)
{
2017-01-29 03:58:16 +00:00
child->SetIsVisible(GetIsVisible());
2016-03-16 03:37:51 +00:00
child = static_cast<CGuiWidget*>(child->GetNextSibling());
}
CGuiWidget::OnVisibleChange();
2016-03-16 03:37:51 +00:00
}
void CGuiCompoundWidget::OnActiveChange()
2016-03-16 03:37:51 +00:00
{
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
while (child)
{
2017-01-29 03:58:16 +00:00
child->SetIsActive(GetIsActive());
2016-03-16 03:37:51 +00:00
child = static_cast<CGuiWidget*>(child->GetNextSibling());
}
CGuiWidget::OnActiveChange();
2016-03-16 03:37:51 +00:00
}
2017-01-09 03:44:00 +00:00
CGuiWidget* CGuiCompoundWidget::GetWorkerWidget(int id) const
2016-03-16 03:37:51 +00:00
{
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
while (child)
{
if (child->GetWorkerId() == id)
return child;
child = static_cast<CGuiWidget*>(child->GetNextSibling());
}
return nullptr;
}
}