mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 05:47:42 +00:00
New code style refactor
This commit is contained in:
@@ -1,45 +1,35 @@
|
||||
#include "CGuiCompoundWidget.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
namespace urde {
|
||||
|
||||
CGuiCompoundWidget::CGuiCompoundWidget(const CGuiWidgetParms& parms)
|
||||
: CGuiWidget(parms)
|
||||
{
|
||||
CGuiCompoundWidget::CGuiCompoundWidget(const CGuiWidgetParms& parms) : CGuiWidget(parms) {}
|
||||
|
||||
void CGuiCompoundWidget::OnVisibleChange() {
|
||||
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
|
||||
while (child) {
|
||||
child->SetIsVisible(GetIsVisible());
|
||||
child = static_cast<CGuiWidget*>(child->GetNextSibling());
|
||||
}
|
||||
CGuiWidget::OnVisibleChange();
|
||||
}
|
||||
|
||||
void CGuiCompoundWidget::OnVisibleChange()
|
||||
{
|
||||
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
|
||||
while (child)
|
||||
{
|
||||
child->SetIsVisible(GetIsVisible());
|
||||
child = static_cast<CGuiWidget*>(child->GetNextSibling());
|
||||
}
|
||||
CGuiWidget::OnVisibleChange();
|
||||
void CGuiCompoundWidget::OnActiveChange() {
|
||||
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
|
||||
while (child) {
|
||||
child->SetIsActive(GetIsActive());
|
||||
child = static_cast<CGuiWidget*>(child->GetNextSibling());
|
||||
}
|
||||
CGuiWidget::OnActiveChange();
|
||||
}
|
||||
|
||||
void CGuiCompoundWidget::OnActiveChange()
|
||||
{
|
||||
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
|
||||
while (child)
|
||||
{
|
||||
child->SetIsActive(GetIsActive());
|
||||
child = static_cast<CGuiWidget*>(child->GetNextSibling());
|
||||
}
|
||||
CGuiWidget::OnActiveChange();
|
||||
CGuiWidget* CGuiCompoundWidget::GetWorkerWidget(int id) const {
|
||||
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
|
||||
while (child) {
|
||||
if (child->GetWorkerId() == id)
|
||||
return child;
|
||||
child = static_cast<CGuiWidget*>(child->GetNextSibling());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CGuiWidget* CGuiCompoundWidget::GetWorkerWidget(int id) const
|
||||
{
|
||||
CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
|
||||
while (child)
|
||||
{
|
||||
if (child->GetWorkerId() == id)
|
||||
return child;
|
||||
child = static_cast<CGuiWidget*>(child->GetNextSibling());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user