Files
UnrealEngineUWP/Engine/Source/Developer/ProjectLauncher/Private/Widgets/Deploy/SProjectLauncherDeployToDeviceSettings.cpp
Chris Gagnon 9ccd8c9ec4 Target Platform API added to provide more information about variants and variant support.
Device Services Refactoring to create the concept of a physical device.
Game launcher and device viewer UI changes to show these new concepts.
#codereview Max.Preussner, Matt.Kuhlenschmidt

[CL 2290918 by Chris Gagnon in Main branch]
2014-09-09 12:20:43 -04:00

103 lines
2.7 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#include "ProjectLauncherPrivatePCH.h"
#define LOCTEXT_NAMESPACE "SProjectLauncherDeployToDeviceSettings"
/* SProjectLauncherDeployToDeviceSettings interface
*****************************************************************************/
void SProjectLauncherDeployToDeviceSettings::Construct( const FArguments& InArgs, const FProjectLauncherModelRef& InModel, EVisibility InShowAdvanced )
{
Model = InModel;
ChildSlot
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
[
SNew(SBorder)
.Padding(8.0f)
.BorderImage(FEditorStyle::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()
[
// unreal pak check box
SNew(SCheckBox)
.IsChecked(this, &SProjectLauncherDeployToDeviceSettings::HandleUnrealPakCheckBoxIsChecked)
.OnCheckStateChanged(this, &SProjectLauncherDeployToDeviceSettings::HandleUnrealPakCheckBoxCheckStateChanged)
.Padding(FMargin(4.0f, 0.0f))
.ToolTipText(LOCTEXT("UnrealPakCheckBoxTooltip", "If checked, the content will be deployed as a single UnrealPak file instead of many separate files."))
.Content()
[
SNew(STextBlock)
.Text(LOCTEXT("UnrealPakCheckBoxText", "Store all content in a single file (UnrealPak)"))
]
]
]
]
]
];
}
/* SProjectLauncherDeployToDeviceSettings callbacks
*****************************************************************************/
void SProjectLauncherDeployToDeviceSettings::HandleUnrealPakCheckBoxCheckStateChanged( ESlateCheckBoxState::Type NewState )
{
ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile();
if (SelectedProfile.IsValid())
{
SelectedProfile->SetDeployWithUnrealPak(NewState == ESlateCheckBoxState::Checked);
}
}
ESlateCheckBoxState::Type SProjectLauncherDeployToDeviceSettings::HandleUnrealPakCheckBoxIsChecked( ) const
{
ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile();
if (SelectedProfile.IsValid())
{
if (SelectedProfile->IsPackingWithUnrealPak())
{
return ESlateCheckBoxState::Checked;
}
}
return ESlateCheckBoxState::Unchecked;
}
#undef LOCTEXT_NAMESPACE