diff --git a/Content/Editor/Slate/Icons/ComboAction_16.svg b/Resources/Slate/Icons/ComboAction_16.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboAction_16.svg rename to Resources/Slate/Icons/ComboAction_16.svg diff --git a/Content/Editor/Slate/Icons/ComboAction_64.svg b/Resources/Slate/Icons/ComboAction_64.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboAction_64.svg rename to Resources/Slate/Icons/ComboAction_64.svg diff --git a/Content/Editor/Slate/Icons/ComboInputAsset_16.svg b/Resources/Slate/Icons/ComboInputAsset_16.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboInputAsset_16.svg rename to Resources/Slate/Icons/ComboInputAsset_16.svg diff --git a/Content/Editor/Slate/Icons/ComboInputAsset_64.svg b/Resources/Slate/Icons/ComboInputAsset_64.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboInputAsset_64.svg rename to Resources/Slate/Icons/ComboInputAsset_64.svg diff --git a/Content/Editor/Slate/Icons/ComboInput_16.svg b/Resources/Slate/Icons/ComboInput_16.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboInput_16.svg rename to Resources/Slate/Icons/ComboInput_16.svg diff --git a/Content/Editor/Slate/Icons/ComboInput_64.svg b/Resources/Slate/Icons/ComboInput_64.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboInput_64.svg rename to Resources/Slate/Icons/ComboInput_64.svg diff --git a/Content/Editor/Slate/Icons/ComboSequenceNode_16.svg b/Resources/Slate/Icons/ComboSequenceNode_16.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboSequenceNode_16.svg rename to Resources/Slate/Icons/ComboSequenceNode_16.svg diff --git a/Content/Editor/Slate/Icons/ComboSequenceNode_64.svg b/Resources/Slate/Icons/ComboSequenceNode_64.svg similarity index 100% rename from Content/Editor/Slate/Icons/ComboSequenceNode_64.svg rename to Resources/Slate/Icons/ComboSequenceNode_64.svg diff --git a/Source/ComboInputEditor/ComboInputEditor.build.cs b/Source/ComboInputEditor/ComboInputEditor.build.cs index e333f4c..4e53f05 100644 --- a/Source/ComboInputEditor/ComboInputEditor.build.cs +++ b/Source/ComboInputEditor/ComboInputEditor.build.cs @@ -26,7 +26,8 @@ public class ComboInputEditor : ModuleRules "Core", "CoreUObject", "AssetTools", - "SlateCore" + "SlateCore", + "Projects" } ); diff --git a/Source/ComboInputEditor/Private/ComboInputEditor.cpp b/Source/ComboInputEditor/Private/ComboInputEditor.cpp index 360acff..966e65e 100644 --- a/Source/ComboInputEditor/Private/ComboInputEditor.cpp +++ b/Source/ComboInputEditor/Private/ComboInputEditor.cpp @@ -122,27 +122,28 @@ class FComboInputSlateStyle final : public FSlateStyleSet public: FComboInputSlateStyle() : FSlateStyleSet("ComboInputEditor") { - SetParentStyleName(FAppStyle::GetAppStyleSetName()); + this->SetParentStyleName(FAppStyle::GetAppStyleSetName()); - // The icons are located in /Engine/Plugins/ComboInput/Content/Editor/Slate/Icons - SetContentRoot(FPaths::EnginePluginsDir() / TEXT("ComboInput/Content/Editor/Slate")); - SetCoreContentRoot(FPaths::EngineContentDir() / TEXT("Slate")); + const FString &PluginSlateDir = IPluginManager::Get().FindPlugin("ComboInput")->GetBaseDir(); + + this->SetContentRoot(PluginSlateDir / TEXT("Resources/Slate")); + this->SetCoreContentRoot(FPaths::EngineContentDir() / TEXT("Slate")); // Combo Input Editor icons static const FVector2D Icon16 = FVector2D(16.0f, 16.0f); static const FVector2D Icon64 = FVector2D(64.0f, 64.0f); - Set("ComboInputIcon_Small", new IMAGE_BRUSH_SVG("Icons/ComboInput_16", Icon16)); - Set("ComboInputIcon_Large", new IMAGE_BRUSH_SVG("Icons/ComboInput_64", Icon64)); + this->Set("ComboInputIcon_Small", new IMAGE_BRUSH_SVG("Icons/ComboInput_16", Icon16)); + this->Set("ComboInputIcon_Large", new IMAGE_BRUSH_SVG("Icons/ComboInput_64", Icon64)); - Set("ClassIcon.ComboAction", new IMAGE_BRUSH_SVG("Icons/ComboAction_16", Icon16)); - Set("ClassThumbnail.ComboAction", new IMAGE_BRUSH_SVG("Icons/ComboAction_64", Icon64)); + this->Set("ClassIcon.ComboAction", new IMAGE_BRUSH_SVG("Icons/ComboAction_16", Icon16)); + this->Set("ClassThumbnail.ComboAction", new IMAGE_BRUSH_SVG("Icons/ComboAction_64", Icon64)); - Set("ClassIcon.ComboSequenceNode", new IMAGE_BRUSH_SVG("Icons/ComboSequenceNode_16", Icon16)); - Set("ClassThumbnail.ComboSequenceNode", new IMAGE_BRUSH_SVG("Icons/ComboSequenceNode_64", Icon64)); + this->Set("ClassIcon.ComboSequenceNode", new IMAGE_BRUSH_SVG("Icons/ComboSequenceNode_16", Icon16)); + this->Set("ClassThumbnail.ComboSequenceNode", new IMAGE_BRUSH_SVG("Icons/ComboSequenceNode_64", Icon64)); - Set("ClassIcon.ComboInputAsset", new IMAGE_BRUSH_SVG("Icons/ComboInputAsset_16", Icon16)); - Set("ClassThumbnail.ComboInputAsset", new IMAGE_BRUSH_SVG("Icons/ComboInputAsset_64", Icon64)); + this->Set("ClassIcon.ComboInputAsset", new IMAGE_BRUSH_SVG("Icons/ComboInputAsset_16", Icon16)); + this->Set("ClassThumbnail.ComboInputAsset", new IMAGE_BRUSH_SVG("Icons/ComboInputAsset_64", Icon64)); } };