stuff-from-scratch/src/ui/ui_controls/StackWidget.cpp
2023-01-17 10:13:25 +00:00

28 lines
435 B
C++

#include "StackWidget.h"
#include <iostream>
StackWidget::StackWidget()
{
}
std::unique_ptr<StackWidget> StackWidget::Create()
{
return std::make_unique<StackWidget>();
}
void StackWidget::showChild(Widget* target)
{
for(auto& child : mChildren)
{
if(child.get() == target)
{
child->setVisible(true);
}
else
{
child->setVisible(false);
}
}
}