You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
UGC localization can be used to provide a simplified localization experience for basic plugins (only providing the PO files to be translated), and is primarily designed for DLC plugins where the UGC localization will be compiled during cook (see UUserGeneratedContentLocalizationSettings). Support for non-DLC plugins can be provided via project specific tooling built upon this base API. Support for complex plugins (such as those containing different kinds of modules, eg) a mix of game/engine and editor) are not supported via this API. #preflight 63c70d2802024f93d87a0e32 #rb Leon.Huang, Dave.Belanger [CL 23761684 by jamie dale in ue5-main branch]
47 lines
2.2 KiB
C++
47 lines
2.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IPropertyTypeCustomization.h"
|
|
#include "Internationalization/CulturePointer.h"
|
|
|
|
namespace ESelectInfo { enum Type : int; }
|
|
|
|
class FUserGeneratedContentLocalizationDescriptorDetails : public IPropertyTypeCustomization
|
|
{
|
|
public:
|
|
/** Makes a new instance of this detail layout class for a specific detail view requesting it */
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance()
|
|
{
|
|
return MakeShared<FUserGeneratedContentLocalizationDescriptorDetails>();
|
|
}
|
|
|
|
//~ Begin IPropertyTypeCustomization Interface
|
|
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
|
|
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
|
|
//~ End IPropertyTypeCustomization Interface
|
|
|
|
private:
|
|
void CustomizeNativeCulture(TSharedRef<IPropertyHandle> PropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils);
|
|
FCulturePtr NativeCulture_GetCulture() const;
|
|
FText NativeCulture_GetDisplayName() const;
|
|
bool NativeCulture_IsCulturePickable(FCulturePtr Culture) const;
|
|
void NativeCulture_OnSelectionChanged(FCulturePtr SelectedCulture, ESelectInfo::Type SelectInfo);
|
|
|
|
void CustomizeCulturesToGenerate(TSharedRef<IPropertyHandle> PropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils);
|
|
void CulturesToGenerate_OnPreBatchSelect();
|
|
void CulturesToGenerate_OnPostBatchSelect();
|
|
void CulturesToGenerate_OnCultureSelectionChanged(bool IsSelected, FCulturePtr Culture);
|
|
bool CulturesToGenerate_IsCultureSelected(FCulturePtr Culture) const;
|
|
void CulturesToGenerate_AddCulture(const FString& CultureName);
|
|
void CulturesToGenerate_RemoveCulture(const FString& CultureName);
|
|
|
|
TArray<FCulturePtr> AvailableCultures;
|
|
|
|
TSharedPtr<IPropertyHandle> NativeCultureHandle;
|
|
|
|
TSharedPtr<IPropertyHandle> CulturesToGenerateHandle;
|
|
|
|
bool CulturesToGenerate_IsInBatchSelectOperation = false;
|
|
};
|