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 "SProjectLauncherDeployFileServerSettings"
/* SProjectLauncherDeployFileServerSettings interface
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void SProjectLauncherDeployFileServerSettings : : Construct ( const FArguments & InArgs , const FProjectLauncherModelRef & InModel )
{
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 ( SExpandableArea )
. AreaTitle ( LOCTEXT ( " AdvancedAreaTitle " , " Advanced Settings " ) )
. InitiallyCollapsed ( true )
. Padding ( 8.0f )
. BodyContent ( )
[
SNew ( SVerticalBox )
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
[
// hide file server check box
SNew ( SCheckBox )
. IsChecked ( this , & SProjectLauncherDeployFileServerSettings : : HandleHideWindowCheckBoxIsChecked )
. OnCheckStateChanged ( this , & SProjectLauncherDeployFileServerSettings : : HandleHideWindowCheckBoxCheckStateChanged )
. Padding ( FMargin ( 4.0f , 0.0f ) )
. ToolTipText ( LOCTEXT ( " HideWindowCheckBoxTooltip " , " If checked, the file server's console window will be hidden from your desktop. " ) )
. Content ( )
[
SNew ( STextBlock )
. Text ( LOCTEXT ( " HideWindowCheckBoxText " , " Hide the file server's console window " ) )
]
]
+ SVerticalBox : : Slot ( )
. AutoHeight ( )
. Padding ( 0.0f , 4.0f , 0.0f , 0.0f )
[
// streaming file server check box
SNew ( SCheckBox )
. IsChecked ( this , & SProjectLauncherDeployFileServerSettings : : HandleStreamingServerCheckBoxIsChecked )
. OnCheckStateChanged ( this , & SProjectLauncherDeployFileServerSettings : : HandleStreamingServerCheckBoxCheckStateChanged )
. Padding ( FMargin ( 4.0f , 0.0f ) )
. ToolTipText ( LOCTEXT ( " StreamingServerCheckBoxTooltip " , " If checked, the file server uses an experimental implementation that can serve multiple files simultaneously. " ) )
. Content ( )
[
SNew ( STextBlock )
. Text ( LOCTEXT ( " StreamingServerCheckBoxText " , " Streaming server (experimental) " ) )
]
]
]
]
] ;
}
/* SProjectLauncherDeployFileServerSettings callbacks
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2014-12-10 14:24:09 -05:00
void SProjectLauncherDeployFileServerSettings : : HandleHideWindowCheckBoxCheckStateChanged ( ECheckBoxState NewState )
2014-09-09 12:20:43 -04:00
{
ILauncherProfilePtr SelectedProfile = Model - > GetSelectedProfile ( ) ;
if ( SelectedProfile . IsValid ( ) )
{
2014-12-10 14:24:09 -05:00
SelectedProfile - > SetHideFileServerWindow ( NewState = = ECheckBoxState : : Checked ) ;
2014-09-09 12:20:43 -04:00
}
}
2014-12-10 14:24:09 -05:00
ECheckBoxState SProjectLauncherDeployFileServerSettings : : HandleHideWindowCheckBoxIsChecked ( ) const
2014-09-09 12:20:43 -04:00
{
ILauncherProfilePtr SelectedProfile = Model - > GetSelectedProfile ( ) ;
if ( SelectedProfile . IsValid ( ) )
{
if ( SelectedProfile - > IsFileServerHidden ( ) )
{
2014-12-10 14:24:09 -05:00
return ECheckBoxState : : Checked ;
2014-09-09 12:20:43 -04:00
}
}
2014-12-10 14:24:09 -05:00
return ECheckBoxState : : Unchecked ;
2014-09-09 12:20:43 -04:00
}
2014-12-10 14:24:09 -05:00
void SProjectLauncherDeployFileServerSettings : : HandleStreamingServerCheckBoxCheckStateChanged ( ECheckBoxState NewState )
2014-09-09 12:20:43 -04:00
{
ILauncherProfilePtr SelectedProfile = Model - > GetSelectedProfile ( ) ;
if ( SelectedProfile . IsValid ( ) )
{
2014-12-10 14:24:09 -05:00
SelectedProfile - > SetStreamingFileServer ( NewState = = ECheckBoxState : : Checked ) ;
2014-09-09 12:20:43 -04:00
}
}
2014-12-10 14:24:09 -05:00
ECheckBoxState SProjectLauncherDeployFileServerSettings : : HandleStreamingServerCheckBoxIsChecked ( ) const
2014-09-09 12:20:43 -04:00
{
ILauncherProfilePtr SelectedProfile = Model - > GetSelectedProfile ( ) ;
if ( SelectedProfile . IsValid ( ) )
{
if ( SelectedProfile - > IsFileServerStreaming ( ) )
{
2014-12-10 14:24:09 -05:00
return ECheckBoxState : : Checked ;
2014-09-09 12:20:43 -04:00
}
}
2014-12-10 14:24:09 -05:00
return ECheckBoxState : : Unchecked ;
2014-09-09 12:20:43 -04:00
}
# undef LOCTEXT_NAMESPACE