Widget Studio
WSSettings.h
1/*
2* Copyright (c) 2021 THEIA INTERACTIVE. All rights reserved.
3*
4* Website: https://widgetstudio.design
5* Documentation: https://docs.widgetstudio.design
6* Support: marketplace@theia.io
7* Marketplace FAQ: https://marketplacehelp.epicgames.com
8*/
9
10#pragma once
11
12#include "CoreMinimal.h"
13#include "UObject/Object.h"
14#include "Theme/WSTheme.h"
15#include "Theme/WSTypography.h"
16#include "Theme/WSIconSet.h"
17#include "WSSettings.generated.h"
18
19extern int32 DefaultBorderRadius;
20extern float DefaultIdealWidth;
21extern float DefaultIdealHeight;
22
26UCLASS(config = Game, defaultconfig)
27class WIDGETSTUDIOEDITOR_API UWidgetStudioSettings final : public UObject
28{
29 GENERATED_BODY()
31
36 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
37
38public:
39 explicit UWidgetStudioSettings(const FObjectInitializer& ObjectInitializer);
40
41 /* Theme Settings */
42
44 UPROPERTY(Config, EditAnywhere, Category = "Theme", Meta = (HideViewOptions, DisplayThumbnail = "false"))
45 TSoftObjectPtr<UWidgetStudioTheme> Theme;
46
51 UPROPERTY(EditAnywhere, Category = "Theme", Meta = (DisplayName = "Create New Theme"))
52 bool CreateThemeButton = false;
53
54 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
55 FLinearColor PrimaryAccent;
56
57 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
58 FLinearColor SecondaryAccent;
59
60 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
61 FLinearColor PrimaryContent;
62
63 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
64 FLinearColor SecondaryContent;
65
66 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
67 FLinearColor TertiaryContent;
68
69 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
70 FLinearColor PrimaryBackground;
71
72 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
73 FLinearColor SecondaryBackground;
74
75 UPROPERTY(VisibleAnywhere, Category = "Theme|Preview", Meta = (HideAlphaChannel = "true"))
76 FLinearColor TertiaryBackground;
77
78
79 /* Typography Settings */
80
82 UPROPERTY(Config, EditAnywhere, Category = "Typography", Meta = (HideViewOptions, DisplayThumbnail = "false"))
83 TSoftObjectPtr<UWidgetStudioTypography> Typography;
84
89 UPROPERTY(EditAnywhere, Category = "Typography", Meta = (DisplayName = "Create New Typography"))
90 bool CreateTypographyButton = false;
91
92
93 /* Icon Settings */
94
96 UPROPERTY(Config, EditAnywhere, Category = "Icon Set", Meta = (HideViewOptions, DisplayThumbnail = "false"))
97 TSoftObjectPtr<UWidgetStudioIconSet> IconSet;
98
103 UPROPERTY(EditAnywhere, Category = "Icon Set", Meta = (DisplayName = "Create New Icon Set"))
104 bool CreateIconSetButton = false;
105
106
107 /* Style Settings */
108
110 UPROPERTY(Config, EditAnywhere, Category = "Style", Meta = (ClampMin = "0", UIMin = "0", ClampMax = "45", UIMax = "45"))
111 int32 BorderRadius = DefaultBorderRadius;
112
114 UPROPERTY(Config, EditAnywhere, Category = "Style", Meta = (ClampMin = "75", UIMin = "75", ClampMax = "1000", UIMax = "1000"))
115 float IdealWidth = DefaultIdealWidth;
116
118 UPROPERTY(Config, EditAnywhere, Category = "Style", Meta = (ClampMin = "35", UIMin = "35", ClampMax = "1000", UIMax = "1000"))
119 float IdealHeight = DefaultIdealHeight;
120
121private:
125 UFUNCTION()
126 void UpdateThemePreview();
127
133 void CreateNewThemeDataAssetObject(const FString FileName, const FString PackageName) const;
134
140 void CreateNewTypographyDataAssetObject(const FString FileName, const FString PackageName) const;
141
147 void CreateNewIconSetDataAssetObject(const FString FileName, const FString PackageName) const;
148
149};
Data asset that contains the current theme icon set.
Definition: WSIconSet.h:25
The Widget Studio editor settings.
Definition: WSSettings.h:28
Data asset that contains the current theme color palette.
Definition: WSTheme.h:21
Data asset that contains the current theme font and its styling.
Definition: WSTypography.h:41