2014-12-07 19:09:38 -05:00
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
2014-09-09 12:20:43 -04:00
# include "ProjectLauncherPrivatePCH.h"
2014-10-14 22:50:06 -04:00
# include "SExpandableArea.h"
2014-09-09 12:20:43 -04:00
# 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 )
]
]
2014-12-11 16:20:07 -05:00
+ SVerticalBox : : Slot ( )
2014-09-09 12:20:43 -04:00
. 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 ( )
[
2014-12-11 16:20:07 -05:00
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 " ) )
]
]
2014-09-09 12:20:43 -04:00
]
]
2014-12-11 16:20:07 -05:00
]
2014-09-09 12:20:43 -04:00
] ;
}
/* SProjectLauncherDeployToDeviceSettings callbacks
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2014-12-11 16:20:07 -05:00
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 ;
}
2014-09-09 12:20:43 -04:00
# undef LOCTEXT_NAMESPACE