I have a Slate implementation of my UI up and running. I currently have a SlateWidgetStyle setup for use with the project. Eventually, I’d like to release a submodule used in our game for the community, but I’d prefer to not require editing of the Projets.cpp file for end users. Are there any other means available of getting a Designer friendly style into the engine, without creating a global?
Here’s what I have currently, so the designer can use the style:
#include "SlatePractice.h"
#include "MenuStyles.h"
class FSlatePracticeGameModule : public FDefaultGameModuleImpl
{
virtual void StartupModule() override
{
FSlateStyleRegistry::UnRegisterSlateStyle(FMenuStyles::GetStyleSetName());
FMenuStyles::Initialize();
}
virtual void ShutdownModule() override
{
FMenuStyles::Shutdown();
}
};
IMPLEMENT_PRIMARY_GAME_MODULE( FSlatePracticeGameModule, SlatePractice, "SlatePractice" );