You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Renamed FDataDrivenPlatformRegistry::FPlatformInfo to FDataDrivenPlatformInfo - Moved some fields from PlatformInfo::FTargetPlatformInfo to FDataDrivenPlatformInfo, and cleaned them up in the process - Fixed the DataDrivePlatformInfo.ini files to match the previous items - Removed FVanillaPlatformEntry, and now just using FTargetPlatformInfo to manage flavors under a vanilla PlatformInfo (see PlatformInfo::GetVanillaPlatformInfoArray()) - Cleaned up TPerPlatformValue, as it was often misused (took a group and platform name, but we can get the group from the platform name) [AnimationSharingManager.cpp, *Engine.cpp, Runtime\Engine\*, ] - Fixed FBlueprintNativeCodeGenPaths::GetDefaultCodeGenPaths() to use IniPlatformName instead of some hacky code [BlueprintNativeCodeGenManifest.cpp] - Fixed various Turnkey bugs that recent testing exposed - Enabled AUTOSDKS_ENABLED in both Mac and Linux on the Editor side (not that there are much set up to use it) - Using Turnkey to get the SDK status instead of ValidatePlatforms (gives more detailed information - may want to go back to ValidatePlatforms so only UBT is needed, but change it to give more info) - Moved OnDeviceDiscovered and Lost delegates from each platform's TargetPlatform class to a static in ITargetPlatform - there was no need for per-platform implementations - Started working on allowing for SDK to be installed with editor running and not need to restart editor - Work in Progress! It is not usable yet. #fyi jack.porter #rb pete.sauerbrei [CL 13816905 by Josh Adams in ue5-main branch]
190 lines
4.6 KiB
C++
190 lines
4.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "DetailsPanel/SDeviceProfileDetailsPanel.h"
|
|
#include "DeviceProfiles/DeviceProfile.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Widgets/SBoxPanel.h"
|
|
#include "SlateOptMacros.h"
|
|
#include "Widgets/Layout/SBorder.h"
|
|
#include "Widgets/Images/SImage.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
#include "Widgets/Layout/SScrollBox.h"
|
|
#include "EditorStyleSet.h"
|
|
#include "Interfaces/ITargetPlatform.h"
|
|
#include "Interfaces/ITargetPlatformManagerModule.h"
|
|
#include "PlatformInfo.h"
|
|
#include "PropertyEditorModule.h"
|
|
#include "IDetailsView.h"
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "DeviceProfileDetailsPanel"
|
|
|
|
|
|
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
|
void SDeviceProfileDetailsPanel::Construct( const FArguments& InArgs )
|
|
{
|
|
// Generate our details panel.
|
|
DetailsViewBox = SNew( SVerticalBox );
|
|
RefreshUI();
|
|
|
|
ChildSlot
|
|
[
|
|
SNew( SBorder )
|
|
.BorderImage( FEditorStyle::GetBrush( "Docking.Tab.ContentAreaBrush" ) )
|
|
[
|
|
SNew( SVerticalBox )
|
|
+ SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
.Padding( FMargin( 2.0f ) )
|
|
.VAlign( VAlign_Bottom )
|
|
[
|
|
SNew( SHorizontalBox )
|
|
+ SHorizontalBox::Slot()
|
|
.AutoWidth()
|
|
.Padding( 0.0f, 0.0f, 4.0f, 0.0f )
|
|
[
|
|
SNew( SImage )
|
|
.Image( FEditorStyle::GetBrush( "LevelEditor.Tabs.Details" ) )
|
|
]
|
|
+ SHorizontalBox::Slot()
|
|
.VAlign( VAlign_Center )
|
|
[
|
|
SNew( STextBlock )
|
|
.Text( LOCTEXT("CVarsLabel", "Console Variables") )
|
|
.TextStyle( FEditorStyle::Get(), "Docking.TabFont" )
|
|
]
|
|
]
|
|
|
|
+ SVerticalBox::Slot()
|
|
[
|
|
SNew( SHorizontalBox )
|
|
+ SHorizontalBox::Slot()
|
|
[
|
|
DetailsViewBox.ToSharedRef()
|
|
]
|
|
]
|
|
]
|
|
];
|
|
}
|
|
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
|
|
|
|
|
void SDeviceProfileDetailsPanel::UpdateUIForProfile( const TWeakObjectPtr< UDeviceProfile > InProfile )
|
|
{
|
|
ViewingProfile = InProfile;
|
|
RefreshUI();
|
|
}
|
|
|
|
|
|
void SDeviceProfileDetailsPanel::RefreshUI()
|
|
{
|
|
DetailsViewBox->ClearChildren();
|
|
|
|
// initialize settings view
|
|
FDetailsViewArgs DetailsViewArgs;
|
|
{
|
|
DetailsViewArgs.bAllowSearch = true;
|
|
DetailsViewArgs.bHideSelectionTip = true;
|
|
DetailsViewArgs.bLockable = false;
|
|
DetailsViewArgs.NameAreaSettings = FDetailsViewArgs::HideNameArea;
|
|
DetailsViewArgs.bSearchInitialKeyFocus = true;
|
|
DetailsViewArgs.bUpdatesFromSelection = false;
|
|
DetailsViewArgs.bShowOptions = false;
|
|
}
|
|
|
|
SettingsView = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor").CreateDetailView(DetailsViewArgs);
|
|
|
|
if( ViewingProfile.IsValid() )
|
|
{
|
|
const FSlateBrush* DeviceProfileTypeIcon = FEditorStyle::GetDefaultBrush();
|
|
TArray<ITargetPlatform*> TargetPlatforms = GetTargetPlatformManager()->GetTargetPlatforms();
|
|
if (TargetPlatforms.Num())
|
|
{
|
|
DeviceProfileTypeIcon = FEditorStyle::GetBrush(TargetPlatforms[0]->GetPlatformInfo().GetIconStyleName(EPlatformIconSize::Normal));
|
|
}
|
|
|
|
SettingsView->SetObject(&*ViewingProfile);
|
|
// If a profile is provided, show the details for this profile.
|
|
DetailsViewBox->AddSlot()
|
|
[
|
|
SNew( SBorder )
|
|
.BorderImage( FEditorStyle::GetBrush( "ToolPanel.GroupBorder" ) )
|
|
[
|
|
SNew( SVerticalBox )
|
|
+ SVerticalBox::Slot()
|
|
.HAlign( HAlign_Left )
|
|
.AutoHeight()
|
|
[
|
|
SNew( SHorizontalBox )
|
|
+ SHorizontalBox::Slot()
|
|
.AutoWidth()
|
|
.Padding(4.0f, 0.0f, 2.0f, 0.0f)
|
|
[
|
|
SNew(SImage)
|
|
.Image(DeviceProfileTypeIcon)
|
|
]
|
|
|
|
+SHorizontalBox::Slot()
|
|
[
|
|
SNew(SVerticalBox)
|
|
+SVerticalBox::Slot()
|
|
.VAlign(VAlign_Center)
|
|
[
|
|
SNew( STextBlock )
|
|
.Text( FText::Format( LOCTEXT( "SelectedDeviceProfileFmt", "{0} selected" ), FText::FromString(ViewingProfile->GetName()) ) )
|
|
]
|
|
]
|
|
]
|
|
|
|
/**
|
|
* CVars part of the details panel
|
|
*/
|
|
+ SVerticalBox::Slot()
|
|
.Padding(4.0f)
|
|
.FillHeight(1.0f)
|
|
[
|
|
SNew(SScrollBox)
|
|
+ SScrollBox::Slot()
|
|
[
|
|
SNew( SBorder )
|
|
.BorderImage( FEditorStyle::GetBrush( "Docking.Tab.ContentAreaBrush" ) )
|
|
[
|
|
SNew( SVerticalBox )
|
|
+ SVerticalBox::Slot()
|
|
.FillHeight(1.0f)
|
|
.Padding( FMargin( 4.0f ) )
|
|
[
|
|
SettingsView.ToSharedRef()
|
|
]
|
|
]
|
|
]
|
|
]
|
|
]
|
|
];
|
|
}
|
|
else
|
|
{
|
|
// No profile was selected, so the panel should reflect this
|
|
DetailsViewBox->AddSlot()
|
|
[
|
|
SNew( SBorder )
|
|
.BorderImage( FEditorStyle::GetBrush( "ToolPanel.GroupBorder" ) )
|
|
[
|
|
SNew(SVerticalBox)
|
|
+SVerticalBox::Slot()
|
|
.VAlign( VAlign_Top )
|
|
.HAlign( HAlign_Center )
|
|
.Padding( 4.0f )
|
|
[
|
|
SNew( STextBlock )
|
|
.Text( LOCTEXT("SelectAProfile", "Select a device profile above...") )
|
|
]
|
|
|
|
]
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|