You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#preflight 6272a74d2f6d177be3c6fdda #rb Matt.Kuhlenschmidt #ROBOMERGE-OWNER: Lauren.Barnes #ROBOMERGE-AUTHOR: lauren.barnes #ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690) #ROBOMERGE-CONFLICT from-shelf [CL 20105363 by Lauren Barnes in ue5-main branch]
111 lines
3.0 KiB
C++
111 lines
3.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SProjectLauncherDeployToDeviceSettings.h"
|
|
|
|
#include "Styling/AppStyle.h"
|
|
#include "Styling/SlateTypes.h"
|
|
#include "Widgets/SBoxPanel.h"
|
|
#include "Widgets/Input/SCheckBox.h"
|
|
#include "Widgets/Layout/SBorder.h"
|
|
#include "Widgets/Layout/SExpandableArea.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
|
|
#include "Widgets/Deploy/SProjectLauncherDeployTargets.h"
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "SProjectLauncherDeployToDeviceSettings"
|
|
|
|
|
|
/* SProjectLauncherDeployToDeviceSettings interface
|
|
*****************************************************************************/
|
|
|
|
void SProjectLauncherDeployToDeviceSettings::Construct(const FArguments& InArgs, const TSharedRef<FProjectLauncherModel>& InModel, EVisibility InShowAdvanced)
|
|
{
|
|
Model = InModel;
|
|
|
|
ChildSlot
|
|
[
|
|
SNew(SVerticalBox)
|
|
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
[
|
|
SNew(SBorder)
|
|
.Padding(8.0f)
|
|
.BorderImage(FAppStyle::GetBrush("ToolPanel.GroupBorder"))
|
|
[
|
|
// deploy targets area
|
|
SNew(SProjectLauncherDeployTargets, InModel)
|
|
]
|
|
]
|
|
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
.Padding(0.0f, 8.0f, 0.0f, 0.0f)
|
|
[
|
|
SNew(SVerticalBox)
|
|
.Visibility(InShowAdvanced)
|
|
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
[
|
|
SNew(SExpandableArea)
|
|
.AreaTitle(LOCTEXT("AdvancedAreaTitle", "Advanced Settings"))
|
|
.InitiallyCollapsed(true)
|
|
.Padding(8.0f)
|
|
.BodyContent()
|
|
[
|
|
SNew(SVerticalBox)
|
|
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
[
|
|
// incremental cook check box
|
|
SNew(SCheckBox)
|
|
.IsChecked(this, &SProjectLauncherDeployToDeviceSettings::HandleIncrementalCheckBoxIsChecked)
|
|
.OnCheckStateChanged(this, &SProjectLauncherDeployToDeviceSettings::HandleIncrementalCheckBoxCheckStateChanged)
|
|
.Padding(FMargin(4.0f, 0.0f))
|
|
.ToolTipText(LOCTEXT("IncrementalCheckBoxTooltip", "If checked, only modified content will be deployed, resulting in much faster deploy times. It is recommended to enable this option whenever possible."))
|
|
.Content()
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(LOCTEXT("IncrementalCheckBoxText", "Only deploy modified content"))
|
|
]
|
|
]
|
|
]
|
|
]
|
|
]
|
|
];
|
|
}
|
|
|
|
|
|
/* SProjectLauncherDeployToDeviceSettings callbacks
|
|
*****************************************************************************/
|
|
|
|
void SProjectLauncherDeployToDeviceSettings::HandleIncrementalCheckBoxCheckStateChanged(ECheckBoxState NewState)
|
|
{
|
|
ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile();
|
|
|
|
if (SelectedProfile.IsValid())
|
|
{
|
|
SelectedProfile->SetIncrementalDeploying(NewState == ECheckBoxState::Checked);
|
|
}
|
|
}
|
|
|
|
|
|
ECheckBoxState SProjectLauncherDeployToDeviceSettings::HandleIncrementalCheckBoxIsChecked() const
|
|
{
|
|
ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile();
|
|
|
|
if (SelectedProfile.IsValid())
|
|
{
|
|
if (SelectedProfile->IsDeployingIncrementally())
|
|
{
|
|
return ECheckBoxState::Checked;
|
|
}
|
|
}
|
|
|
|
return ECheckBoxState::Unchecked;
|
|
}
|
|
#undef LOCTEXT_NAMESPACE
|