in GameLiftPlugin/Source/GameLiftPlugin/Private/SMenu/Containers/SGameLiftDeployContainersMenu.cpp [38:193]
void SGameLiftDeployContainersMenu::Construct(const FArguments& InArgs)
{
ContextWindow = InArgs._ContextWindow;
// Create the widgets
CreateCreateContainerGroupSection();
CreateBuildAndPushToECRSection();
CreateSetupECRRepositorySection();
CreateCreateContainerImageSection();
CreateCreateContainerFleetSection();
ContainerSteps = SNew(SVerticalBox);
ContainerSteps->AddSlot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
CreateDivider()
];
ContainerSteps->AddSlot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
CreateIntakeQuestionnaireSection()
];
ContainerSteps->AddSlot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
SNew(SBox)
[
CreateDivider()
]
];
ContainerSteps->AddSlot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
SNew(SBox)
[
CreateUserInputSection()
]
];
ContainerSteps->AddSlot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
SNew(SBox)
[
CreateDivider()
]
];
ContainerSteps->AddSlot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
SNew(SBox)
[
CreateControlBarSection()
]
];
ContainerSteps->AddSlot()
.AutoHeight()
[
SNew(SBox)
.Visibility_Lambda([this]()
{
return IsContainerSupportedRegion() && HasDeploymentStarted() ? EVisibility::Visible : EVisibility::Collapsed;
})
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Bottom5x)
[
CreateDivider()
]
+ SVerticalBox::Slot()
.AutoHeight()
.HAlign(HAlign_Fill)
.Padding(SPadding::Left5x_Right5x + SPadding::Extra_For_Page_End) // This adds more space at the bottom so users can scroll down further.
[
SAssignNew(DeployScenarioSwitcher, SWidgetSwitcher)
.WidgetIndex_Lambda([&]()
{
UGameLiftContainersStatus* ContainersStatus = GetMutableDefault<UGameLiftContainersStatus>();
return ContainersStatus->DeploymentScenario;
})
+ SWidgetSwitcher::Slot()
[
CreateScenarioOneWorkflow()
]
+ SWidgetSwitcher::Slot()
[
CreateScenarioOneWorkflow()
]
+ SWidgetSwitcher::Slot()
[
CreateScenarioTwoWorkflow()
]
+ SWidgetSwitcher::Slot()
[
CreateScenarioThreeWorkflow()
]
]
+ SVerticalBox::Slot()
.AutoHeight()
[
CreateLaunchBar()
]
]
];
ChildSlot
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
.Padding(SPadding::Left5x_Right5x + SPadding::Top5x_Bottom5x)
[
CreateAWSCredentialsProfileSection()
]
+ SVerticalBox::Slot()
[
ContainerSteps.ToSharedRef()
]
];
SetExpandedSections();
SUpdateDeploymentModal::OnUpdateDeploymentMultiDelegate.AddSP(this, &SGameLiftDeployContainersMenu::OnUpdateDeployment);
SControlBarSection::OnNewDeploymentMultiDelegate.AddSP(this, &SGameLiftDeployContainersMenu::OnNewDeployment);
SResetDeploymentModal::OnResetDeploymentMultiDelegate.AddSP(this, &SGameLiftDeployContainersMenu::OnResetDeployment);
SGameLiftSettingsAwsAccountMenu::OnProfileSelectionChangedMultiDelegate.AddSP(this, &SGameLiftDeployContainersMenu::OnProfileSelectionChanged);
UGameLiftContainersStatus* ContainersStatus = GetMutableDefault<UGameLiftContainersStatus>();
ContainersStatus->IsUpdateContainerFleetModalOpen = false;
ContainersStatus->IsResetContainerFleetModalOpen = false;
UpdateAWSCredentialsProfileSectionUI();
OnModalClosed.BindLambda([this]() {
this->SetEnabled(true);
});
OnModalOpened.BindLambda([this]() {
this->SetEnabled(false);
});
}