Set up stacked widget.
This commit is contained in:
parent
4e85edacc8
commit
ee51f3ee09
51 changed files with 808 additions and 195 deletions
26
src/ui_elements/widgets/StackWidget.cpp
Normal file
26
src/ui_elements/widgets/StackWidget.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "StackWidget.h"
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue