Skip to content

Commit

Permalink
[update] version 1.5.1 bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashe23 committed Nov 5, 2021
1 parent 86dfe04 commit cd2447c
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 28 deletions.
14 changes: 7 additions & 7 deletions ProjectCleaner.uplugin
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.5",
"FriendlyName": "ProjectCleaner",
"VersionName": "1.5.1",
"FriendlyName": "ProjectCleaner",
"Description": "UE4 plugin for managing unused assets in project.",
"Category": "ProjectManagementTools",
"CreatedBy": "Ashot Barkhudaryan",
"CreatedByURL": "https://github.com/ashe23",
"DocsURL": "https://github.com/ashe23/ProjectCleaner",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/4d7f5dc837fc4b009bb91e678adf9fd0",
"SupportURL": "",
"EngineVersion": "5.0.0",
"EngineVersion": "4.27.0",
"CanContainContent": false,
"IsBetaVersion": true,
"EnabledByDefault" : true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "ProjectCleaner",
"Type": "Editor",
"LoadingPhase": "PostDefault",
"WhitelistPlatforms": [ "Win64" ]
"WhitelistPlatforms": [ "Win64", "Win32"]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ void SProjectCleanerExcludedAssetsUI::UpdateUI()
ChildSlot
[
SNew(SSplitter)
.Style(FEditorStyle::Get(), "ContentBrowser.Splitter")
.PhysicalSplitterHandleSize(3.0f)
+ SSplitter::Slot()
.Value(0.2f)
Expand Down
1 change: 1 addition & 0 deletions Source/ProjectCleaner/Private/UI/ProjectCleanerMainUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void SProjectCleanerMainUI::Construct(const FArguments& InArgs)
.FillHeight(1.0f)
[
SNew(SSplitter)
.Style(FEditorStyle::Get(), "ContentBrowser.Splitter")
.PhysicalSplitterHandleSize(5.0f)
+ SSplitter::Slot()
.Value(0.35f)
Expand Down
23 changes: 22 additions & 1 deletion Source/ProjectCleaner/Private/UI/ProjectCleanerStatisticsUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ void SProjectCleanerStatisticsUI::Construct(const FArguments& InArgs)
[
SNew(SProgressBar)
.Percent_Raw(this, &SProjectCleanerStatisticsUI::GetPercentRatio)
.FillColorAndOpacity_Raw(this, &SProjectCleanerStatisticsUI::GetProgressBarColor)
]
+ SOverlay::Slot()
.HAlign(HAlign_Center)
Expand All @@ -275,7 +276,7 @@ void SProjectCleanerStatisticsUI::Construct(const FArguments& InArgs)
SNew(STextBlock)
.AutoWrapText(false)
.Font(FProjectCleanerStyle::Get().GetFontStyle("ProjectCleaner.Font.Light15"))
.ColorAndOpacity(FLinearColor{1.0f, 1.0f, 1.0f, 1.0f})
.ColorAndOpacity(FLinearColor{ 0.0f, 0.0f, 0.0f, 1.0f })
.Text_Raw(this, &SProjectCleanerStatisticsUI::GetProgressBarText )
]
]
Expand Down Expand Up @@ -343,6 +344,26 @@ TOptional<float> SProjectCleanerStatisticsUI::GetPercentRatio() const
return FMath::GetMappedRangeValueClamped(FVector2D{0.0f, 100.0f}, FVector2D{0.0f, 1.0f}, Percent);
}

FSlateColor SProjectCleanerStatisticsUI::GetProgressBarColor() const
{
const float Percent = CleanerManager->GetUnusedAssetsPercent();

if (Percent > 0.0f && Percent < 10.0f)
{
return FSlateColor{ FLinearColor{0.0f, 0.901f , 0.462f ,1.0f} }; // light green
}
if (Percent > 10.0f && Percent < 50.0f)
{
return FSlateColor{ FLinearColor{1.0f, 0.933f , 0.345f ,1.0f} }; // light yellow
}
if (Percent > 50.0f && Percent < 80.0f)
{
return FSlateColor{ FLinearColor{0.898f, 0.450f , 0.450f ,1.0f} }; // light red
}

return FSlateColor{ FLinearColor{0.766f, 0.156f , 0.156f ,1.0f} }; // bright red
}

FText SProjectCleanerStatisticsUI::GetProgressBarText() const
{
return FText::FromString(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ void SProjectCleanerUnusedAssetsBrowserUI::UpdateUI()
ChildSlot
[
SNew(SSplitter)
.Style(FEditorStyle::Get(), "ContentBrowser.Splitter")
.PhysicalSplitterHandleSize(2.0f)
+ SSplitter::Slot()
.Value(0.3f)
Expand Down
37 changes: 17 additions & 20 deletions Source/ProjectCleaner/ProjectCleaner.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,58 @@ public class ProjectCleaner : ModuleRules
public ProjectCleaner(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

PublicIncludePaths.AddRange(
new string[]
{
"Runtime/Slate/Public",
}
);


PrivateIncludePaths.AddRange(
new string[]
{
"ProjectCleaner/Private",
"ProjectCleaner/Private/Commandlets",
}
);


PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
// ... add other public dependencies that you statically link with here ...
}
);
);


PrivateDependencyModuleNames.AddRange(
new string[]
{
"Projects",
"InputCore",
"EditorFramework",
"UnrealEd",
"ToolMenus",
"LevelEditor",
"CoreUObject",
"Engine",
"Slate",
"SlateCore",
"LevelEditor",
"SlateCore",
"ContentBrowser",
"EditorStyle",
"PropertyEditor",
"UnrealEd",
"ToolMenus",
"AssetTools",
"AssetRegistry"
// ... add private dependencies that you statically link with here ...
}
);
);


DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class SProjectCleanerStatisticsUI : public SCompoundWidget
FText GetCorruptedAssetsNum() const;
FText GetExcludedAssetsNum() const;
TOptional<float> GetPercentRatio() const;
FSlateColor GetProgressBarColor() const;
FText GetProgressBarText() const;

/** Data **/
Expand Down

0 comments on commit cd2447c

Please sign in to comment.