You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Themes are basic json files which can change the named colors that the editor uses for its UI. They work similarly to config files in that the same theme in a user dir overrides the project dir and the base dir. Themes only work in the editor or standalone programs. Not supported in UMG or shipping games [CL 14179270 by Matt Kuhlenschmidt in ue5-main branch]
54 lines
1.9 KiB
C++
54 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IDetailCustomization.h"
|
|
#include "IPropertyTypeCustomization.h"
|
|
#include "Styling/StyleColors.h"
|
|
|
|
class IDetailLayoutBuilder;
|
|
class STextComboBox;
|
|
class IDetailPropertyRow;
|
|
|
|
#if ALLOW_THEMES
|
|
|
|
DECLARE_DELEGATE_OneParam(FOnThemeEditorClosed, bool)
|
|
|
|
class FStyleColorListCustomization : public IPropertyTypeCustomization
|
|
{
|
|
public:
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
|
|
|
|
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> PropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& CustomizationUtils) override;
|
|
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> PropertyHandle, IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& CustomizationUtils) override;
|
|
private:
|
|
void OnResetColorToDefault(TSharedPtr<IPropertyHandle> Handle, EStyleColor Color);
|
|
bool IsResetToDefaultVisible(TSharedPtr<IPropertyHandle> Handle, EStyleColor Color);
|
|
};
|
|
|
|
class FEditorStyleSettingsCustomization : public IDetailCustomization
|
|
{
|
|
public:
|
|
/** Makes a new instance of this detail layout class for a specific detail view requesting it */
|
|
static TSharedRef<IDetailCustomization> MakeInstance();
|
|
|
|
/** IDetailCustomization interface */
|
|
virtual void CustomizeDetails(IDetailLayoutBuilder& DetailLayout) override;
|
|
|
|
void RefreshComboBox();
|
|
private:
|
|
void GenerateThemeOptions(TSharedPtr<FString>& OutSelectedTheme);
|
|
|
|
void MakeThemePickerRow(IDetailPropertyRow& PropertyRow);
|
|
FReply OnDuplicateAndEditThemeClicked();
|
|
FReply OnEditThemeClicked();
|
|
FString GetTextLabelForThemeEntry(TSharedPtr<FString> Entry);
|
|
void OnThemePicked(TSharedPtr<FString> NewSelection, ESelectInfo::Type SelectInfo);
|
|
void OpenThemeEditorWindow(FOnThemeEditorClosed OnThemeEditorClosed);
|
|
bool IsThemeEditingEnabled() const;
|
|
private:
|
|
TArray<TSharedPtr<FString>> ThemeOptions;
|
|
TSharedPtr<STextComboBox> ComboBox;
|
|
};
|
|
#endif
|