2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "GameProjectGenerationPrivatePCH.h"
|
|
|
|
|
#include "MainFrame.h"
|
|
|
|
|
#include "DesktopPlatformModule.h"
|
|
|
|
|
#include "IDocumentation.h"
|
|
|
|
|
#include "EngineBuildSettings.h"
|
|
|
|
|
#include "EngineAnalytics.h"
|
|
|
|
|
#include "AnalyticsEventAttribute.h"
|
|
|
|
|
#include "IAnalyticsProvider.h"
|
2014-10-14 22:50:06 -04:00
|
|
|
#include "SWidgetSwitcher.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "GameProjectGeneration"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* SGameProjectDialog interface
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
|
|
|
|
void SGameProjectDialog::Construct( const FArguments& InArgs )
|
|
|
|
|
{
|
|
|
|
|
bool bAtLeastOneVisibleRecentProject = false;
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
if (InArgs._AllowProjectCreate)
|
|
|
|
|
{
|
|
|
|
|
NewProjectWizard = SNew(SNewProjectWizard);
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
if (InArgs._AllowProjectOpening)
|
|
|
|
|
{
|
|
|
|
|
ProjectBrowser = SNew(SProjectBrowser);
|
|
|
|
|
}
|
|
|
|
|
|
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
|
|
|
FadeAnimation.AddCurve( 0.f, 0.5f, ECurveEaseFunction::QuadOut );
|
2014-12-19 17:44:49 -05:00
|
|
|
RegisterActiveTimer( 0.f, FWidgetActiveTimerDelegate::CreateSP( this, &SGameProjectDialog::TriggerFadeInPostConstruct ) );
|
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
TSharedPtr<SWidget> Content;
|
|
|
|
|
|
|
|
|
|
if (InArgs._AllowProjectCreate && InArgs._AllowProjectOpening)
|
|
|
|
|
{
|
|
|
|
|
// Create the Open Project tab button
|
|
|
|
|
TSharedRef<SButton> ProjectsTabButton = SNew(SButton)
|
|
|
|
|
.ForegroundColor(FCoreStyle::Get().GetSlateColor("Foreground"))
|
|
|
|
|
.ButtonStyle(FEditorStyle::Get(), TEXT("NoBorder"))
|
|
|
|
|
.OnClicked(this, &SGameProjectDialog::HandleProjectsTabButtonClicked)
|
|
|
|
|
.ContentPadding(FMargin(40, 5))
|
|
|
|
|
.Text(LOCTEXT("ProjectsTabTitle", "Projects"))
|
|
|
|
|
.TextStyle(FEditorStyle::Get(), TEXT("ProjectBrowser.Tab.Text"));
|
|
|
|
|
|
|
|
|
|
// Create the New Project tab button
|
|
|
|
|
TSharedRef<SButton> NewProjectTabButton = SNew(SButton)
|
|
|
|
|
.ForegroundColor(FCoreStyle::Get().GetSlateColor("Foreground"))
|
|
|
|
|
.ButtonStyle(FEditorStyle::Get(), "NoBorder")
|
|
|
|
|
.OnClicked(this, &SGameProjectDialog::HandleNewProjectTabButtonClicked)
|
|
|
|
|
.ContentPadding(FMargin(20, 5))
|
|
|
|
|
.TextStyle(FEditorStyle::Get(), "ProjectBrowser.Tab.Text")
|
|
|
|
|
.Text(LOCTEXT("NewProjectTabTitle", "New Project"))
|
|
|
|
|
.ToolTip(IDocumentation::Get()->CreateToolTip(LOCTEXT("NewProjectTabTitle", "New Project"), nullptr, "Shared/LevelEditor", "NewProjectTab"));
|
|
|
|
|
|
|
|
|
|
// Allow creation and opening, so we need tabs here
|
|
|
|
|
ChildSlot
|
|
|
|
|
[
|
|
|
|
|
|
|
|
|
|
SNew(SBorder)
|
|
|
|
|
.ColorAndOpacity(this, &SGameProjectDialog::HandleCustomContentColorAndOpacity)
|
|
|
|
|
.BorderImage(FEditorStyle::GetBrush("Docking.Tab.ContentAreaBrush"))
|
|
|
|
|
.Padding(0)
|
2014-03-14 14:13:41 -04:00
|
|
|
[
|
2014-09-09 12:16:36 -04:00
|
|
|
SNew(SVerticalBox)
|
|
|
|
|
|
|
|
|
|
+ SVerticalBox::Slot()
|
|
|
|
|
.AutoHeight()
|
|
|
|
|
.Padding(FMargin(6.f, 0, 0, 0))
|
|
|
|
|
[
|
|
|
|
|
SNew(SHorizontalBox)
|
|
|
|
|
|
|
|
|
|
// Open Project Tab
|
|
|
|
|
+ SHorizontalBox::Slot()
|
|
|
|
|
.AutoWidth()
|
2014-03-14 14:13:41 -04:00
|
|
|
[
|
2014-09-09 12:16:36 -04:00
|
|
|
SNew( SBorder )
|
|
|
|
|
.BorderImage(this, &SGameProjectDialog::OnGetTabBorderImage, ProjectsTab)
|
|
|
|
|
.Padding(0)
|
|
|
|
|
[
|
|
|
|
|
SNew(SOverlay)
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
+ SOverlay::Slot()
|
|
|
|
|
.VAlign(VAlign_Top)
|
2014-03-14 14:13:41 -04:00
|
|
|
[
|
2014-09-09 12:16:36 -04:00
|
|
|
SNew(SBox)
|
|
|
|
|
.HeightOverride(2.0f)
|
|
|
|
|
[
|
|
|
|
|
SNew(SImage)
|
|
|
|
|
.Image(this, &SGameProjectDialog::OnGetTabHeaderImage, ProjectsTab, ProjectsTabButton)
|
|
|
|
|
.Visibility(EVisibility::HitTestInvisible)
|
|
|
|
|
]
|
2014-03-14 14:13:41 -04:00
|
|
|
]
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
+ SOverlay::Slot()
|
2014-03-14 14:13:41 -04:00
|
|
|
[
|
2014-09-09 12:16:36 -04:00
|
|
|
ProjectsTabButton
|
2014-03-14 14:13:41 -04:00
|
|
|
]
|
2014-09-09 12:16:36 -04:00
|
|
|
]
|
2014-03-14 14:13:41 -04:00
|
|
|
]
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
+ SHorizontalBox::Slot()
|
|
|
|
|
.Padding(FMargin(6.f, 0, 0, 0))
|
|
|
|
|
.AutoWidth()
|
|
|
|
|
[
|
|
|
|
|
SNew(SBorder)
|
|
|
|
|
.BorderImage(this, &SGameProjectDialog::OnGetTabBorderImage, NewProjectTab)
|
|
|
|
|
.Padding(0)
|
|
|
|
|
[
|
|
|
|
|
SNew(SOverlay)
|
|
|
|
|
|
|
|
|
|
+ SOverlay::Slot()
|
|
|
|
|
.VAlign(VAlign_Top)
|
|
|
|
|
[
|
|
|
|
|
SNew(SBox)
|
|
|
|
|
.HeightOverride(2.0f)
|
|
|
|
|
[
|
|
|
|
|
SNew(SImage)
|
|
|
|
|
.Image(this, &SGameProjectDialog::OnGetTabHeaderImage, NewProjectTab, NewProjectTabButton)
|
|
|
|
|
.Visibility(EVisibility::HitTestInvisible)
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
+ SOverlay::Slot()
|
|
|
|
|
[
|
|
|
|
|
NewProjectTabButton
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
+ SVerticalBox::Slot()
|
|
|
|
|
[
|
|
|
|
|
SAssignNew(ContentAreaSwitcher, SWidgetSwitcher)
|
|
|
|
|
.WidgetIndex(0)
|
|
|
|
|
|
|
|
|
|
+ SWidgetSwitcher::Slot()
|
|
|
|
|
[
|
|
|
|
|
ProjectBrowser.ToSharedRef()
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
+ SWidgetSwitcher::Slot()
|
|
|
|
|
[
|
|
|
|
|
NewProjectWizard.ToSharedRef()
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TSharedPtr<SWidget> BorderContent;
|
|
|
|
|
if (NewProjectWizard.IsValid())
|
|
|
|
|
{
|
|
|
|
|
BorderContent = NewProjectWizard;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
BorderContent = ProjectBrowser;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ChildSlot
|
|
|
|
|
[
|
|
|
|
|
BorderContent.ToSharedRef()
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ActiveTab = InArgs._AllowProjectOpening ? ProjectsTab : NewProjectTab;
|
|
|
|
|
if (ProjectBrowser.IsValid())
|
|
|
|
|
{
|
|
|
|
|
ActiveTab = !ProjectBrowser->HasProjects() && InArgs._AllowProjectCreate ? NewProjectTab : ActiveTab;
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
if (ActiveTab == ProjectsTab)
|
|
|
|
|
{
|
|
|
|
|
ShowProjectBrowser();
|
|
|
|
|
}
|
|
|
|
|
else if (ActiveTab == NewProjectTab)
|
|
|
|
|
{
|
|
|
|
|
ShowNewProjectTab();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
check(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-19 17:44:49 -05:00
|
|
|
EActiveTimerReturnType SGameProjectDialog::TriggerFadeInPostConstruct(double InCurrentTime, float InDeltaTime)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
// Play the intro fade in the first frame after the widget is created.
|
|
|
|
|
// We start it now instead of Construct because there is a lot of elapsed time between Construct and when we
|
|
|
|
|
// see the dialog and the beginning of the animation is cut off.
|
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
|
|
|
FadeAnimation.Play(this->AsShared());
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-12-19 17:44:49 -05:00
|
|
|
return EActiveTimerReturnType::Stop;
|
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/* SGameProjectDialog implementation
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
bool SGameProjectDialog::OpenProject( const FString& ProjectFile )
|
|
|
|
|
{
|
|
|
|
|
FText FailReason;
|
|
|
|
|
|
|
|
|
|
if (GameProjectUtils::OpenProject(ProjectFile, FailReason))
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FMessageDialog::Open(EAppMsgType::Ok, FailReason);
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SGameProjectDialog::ShowNewProjectTab( )
|
|
|
|
|
{
|
|
|
|
|
if (ContentAreaSwitcher.IsValid() && NewProjectWizard.IsValid())
|
|
|
|
|
{
|
|
|
|
|
ContentAreaSwitcher->SetActiveWidget( NewProjectWizard.ToSharedRef());
|
|
|
|
|
ActiveTab = NewProjectTab;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FReply SGameProjectDialog::ShowProjectBrowser( )
|
|
|
|
|
{
|
|
|
|
|
if (ContentAreaSwitcher.IsValid() && ProjectBrowser.IsValid())
|
|
|
|
|
{
|
|
|
|
|
ContentAreaSwitcher->SetActiveWidget(ProjectBrowser.ToSharedRef());
|
|
|
|
|
ActiveTab = ProjectsTab;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* SGameProjectDialog callbacks
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
FLinearColor SGameProjectDialog::HandleCustomContentColorAndOpacity( ) const
|
|
|
|
|
{
|
---- Merging with SlateDev branch ----
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]
2014-12-17 16:07:57 -05:00
|
|
|
return FLinearColor(1,1,1, FadeAnimation.GetLerp());
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FReply SGameProjectDialog::HandleNewProjectTabButtonClicked( )
|
|
|
|
|
{
|
|
|
|
|
ShowNewProjectTab();
|
|
|
|
|
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
const FSlateBrush* SGameProjectDialog::OnGetTabHeaderImage( ETab InTab, TSharedRef<SButton> TabButton ) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-09 12:16:36 -04:00
|
|
|
if (TabButton->IsPressed())
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return FEditorStyle::GetBrush("ProjectBrowser.Tab.PressedHighlight");
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
if ((ActiveTab == InTab) || TabButton->IsHovered())
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return FEditorStyle::GetBrush("ProjectBrowser.Tab.ActiveHighlight");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FEditorStyle::GetBrush("ProjectBrowser.Tab.Highlight");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FReply SGameProjectDialog::HandleProjectsTabButtonClicked( )
|
|
|
|
|
{
|
|
|
|
|
ShowProjectBrowser();
|
|
|
|
|
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-09 12:16:36 -04:00
|
|
|
const FSlateBrush* SGameProjectDialog::OnGetTabBorderImage( ETab InTab ) const
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-09 12:16:36 -04:00
|
|
|
if (ActiveTab == InTab)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return FEditorStyle::GetBrush("ProjectBrowser.Tab.ActiveBackground");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FEditorStyle::GetBrush("ProjectBrowser.Tab.Background");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|