in GameLiftPlugin/Source/GameLiftPlugin/Private/SWidgets/SLaunchBar.cpp [15:99]
void SLaunchBar::Construct(const FArguments& InArgs)
{
ClientBuildExecutablePath = InArgs._DefaultClientBuildExecutablePath;
OnStartClientButtonClicked = InArgs._OnStartClientButtonClicked;
OnStartClientButtonClickedWith2Players = InArgs._OnStartClientButtonClickedWith2Players;
OnStartServerButtonClicked = InArgs._OnStartServerButtonClicked;
IsStartServerButtonEnabled = InArgs._IsStartServerButtonEnabled;
IsStartClientButtonEnabled = InArgs._IsStartClientButtonEnabled;
IsUpdateDeploymentButtonEnabled = InArgs._IsUpdateDeploymentButtonEnabled;
ParentWidget = InArgs._ParentWidget;
MenuType = InArgs._MenuType;
if (MenuType == EMenuType::Anywhere)
{
ShowStartServerButton = true;
}
else if (MenuType == EMenuType::Containers)
{
ShowUpdateDeploymentButton = true;
}
ChildSlot
[
SAssignNew(LaunchBar, SBorder)
.BorderBackgroundColor(FColor::Black)
.BorderImage(FGameLiftPluginStyle::Get().GetBrush(Style::Brush::kBorderImageName))
.Padding(SPadding::LaunchBarPadding)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.FillWidth(1)
.HAlign(HAlign_Left)
[
CreateUpdateDeploymentButton()
]
+ SHorizontalBox::Slot()
.FillWidth(1)
.HAlign(HAlign_Right)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.AutoWidth()
.Padding(SPadding::Right2x)
[
CreateTest2PlayerClientCheckBox()
]
+ SHorizontalBox::Slot()
.AutoWidth()
.Padding(SPadding::Right2x)
[
CreateStartServerInstruction()
]
+ SHorizontalBox::Slot()
.AutoWidth()
.Padding(SPadding::Right2x)
[
SAssignNew(StartServerButtonWidgetSwitcher, SWidgetSwitcher)
+ SWidgetSwitcher::Slot()
[
CreateStartServerButton()
]
+ SWidgetSwitcher::Slot()
[
CreateLoadingButton()
]
]
+ SHorizontalBox::Slot()
.AutoWidth()
[
SAssignNew(StartClientButtonWidgetSwitcher, SWidgetSwitcher)
+ SWidgetSwitcher::Slot()
[
CreateStartClientButton()
]
+ SWidgetSwitcher::Slot()
[
CreateLoadingButton()
]
]
]
]
];
CreateClientBuildModal();
}