skeleton
This commit is contained in:
66
Source/SaneSlate/SaneSlate.build.cs
Normal file
66
Source/SaneSlate/SaneSlate.build.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class SaneSlate : ModuleRules
|
||||
{
|
||||
public static void SetDevConfig(ReadOnlyTargetRules Target, ModuleRules rules)
|
||||
{
|
||||
// Only use the configuration if building in editor (only for development)
|
||||
if (Target.bCompileAgainstEditor == false) {
|
||||
return;
|
||||
}
|
||||
rules.bValidateCircularDependencies = true;
|
||||
rules.bUseUnity = false;
|
||||
rules.bMergeUnityFiles = false;
|
||||
var Kilobyte = 1024;
|
||||
rules.NumIncludedBytesPerUnityCPPOverride = Kilobyte * 32;
|
||||
rules.IWYUSupport = IWYUSupport.None;
|
||||
rules.PCHUsage = PCHUsageMode.NoPCHs;
|
||||
rules.MinFilesUsingPrecompiledHeaderOverride = 1;
|
||||
rules.OptimizeCode = CodeOptimization.Never;
|
||||
// rules.MinCpuArchX64 = MinimumCpuArchitectureX64.AVX512;
|
||||
rules.bDisableStaticAnalysis = true;
|
||||
rules.bEnableExceptions = false;
|
||||
rules.bEnableBufferSecurityChecks = false;
|
||||
rules.bEnableNonInlinedGenCppWarnings = false;
|
||||
rules.bIgnoreUnresolvedSymbols = false;
|
||||
rules.ShadowVariableWarningLevel = WarningLevel.Error;
|
||||
rules.bEnableUndefinedIdentifierWarnings = false;
|
||||
rules.bWarningsAsErrors = true;
|
||||
rules.bCodeCoverage = false;
|
||||
// Not in 5.3
|
||||
// rules.bValidateFormatStrings = false;
|
||||
// rules.bValidateInternalApi = false;
|
||||
// rules.UndefinedIdentifierWarningLevel = UnrealBuildTool.WarningLevel.Off;
|
||||
}
|
||||
|
||||
public static void SetupFolderModuleIncludePath(ModuleRules rules)
|
||||
{
|
||||
rules.bAddDefaultIncludePaths = false;
|
||||
|
||||
rules.PrivateIncludePaths.AddRange(new string [] {
|
||||
rules.ModuleDirectory,
|
||||
});
|
||||
rules.PublicIncludePaths.AddRange(new string [] {
|
||||
rules.ModuleDirectory + "/..",
|
||||
});
|
||||
}
|
||||
|
||||
public SaneSlate(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
|
||||
SetDevConfig(Target, this);
|
||||
SetupFolderModuleIncludePath(this);
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[] {
|
||||
"Core",
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"InputCore",
|
||||
"Json",
|
||||
"JsonUtilities",
|
||||
"SlateCore",
|
||||
"Slate",
|
||||
"UMG",
|
||||
});
|
||||
}
|
||||
}
|
||||
51
Source/SaneSlate/SaneSlateCommon.h
Normal file
51
Source/SaneSlate/SaneSlateCommon.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "SaneSlateEngineMinimal.h"
|
||||
|
||||
#pragma region Engine Forwards
|
||||
class FJsonObject;
|
||||
class FJsonValue;
|
||||
|
||||
class FProperty;
|
||||
class FBoolProperty;
|
||||
class FByteProperty;
|
||||
class FEnumProperty;
|
||||
class FIntProperty;
|
||||
class FInt8Property;
|
||||
class FInt64Property;
|
||||
class FUInt32Property;
|
||||
class FFloatProperty;
|
||||
class FDoubleProperty;
|
||||
class FStrProperty;
|
||||
class FNameProperty;
|
||||
class FTextProperty;
|
||||
class FInterfaceProperty;
|
||||
class FStructProperty;
|
||||
class FObjectProperty;
|
||||
class FClassProperty;
|
||||
class FArrayProperty;
|
||||
class FMapProperty;
|
||||
class FSetProperty;
|
||||
|
||||
class FSubsystemCollectionBase;
|
||||
|
||||
class SPanel;
|
||||
class SScrollBox;
|
||||
class STextBlock;
|
||||
class SVerticalBox;
|
||||
class SWidget;
|
||||
class SWindow;
|
||||
|
||||
class UObject;
|
||||
#pragma endregion Engine Forwards
|
||||
|
||||
#pragma region Plugin Forwards
|
||||
|
||||
#pragma endregion Plugin Forwards
|
||||
|
||||
#ifndef SaneSlate_NS
|
||||
#define SaneSlate_NS_BEGIN namespace SaneSlate {
|
||||
#define SaneSlate_NS_END }
|
||||
#define SaneSlate_NS SaneSlate::
|
||||
#endif
|
||||
|
||||
25
Source/SaneSlate/SaneSlateEngineMinimal.h
Normal file
25
Source/SaneSlate/SaneSlateEngineMinimal.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Low level includes.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#include "CoreTypes.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Forward declarations
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#include "CoreFwd.h"
|
||||
#include "UObject/UObjectHierarchyFwd.h"
|
||||
#include "Containers/ContainersFwd.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Commonly used headers
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#include "Misc/VarArgs.h"
|
||||
#include "Logging/LogVerbosity.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
#include "Delegates/Delegate.h"
|
||||
#include "Delegates/DelegateCombinations.h"
|
||||
@@ -1 +1,2 @@
|
||||
#include "SaneSlateLog.h"
|
||||
#include "SaneSlateLog.h"
|
||||
|
||||
|
||||
@@ -59,18 +59,6 @@ using FLogCategoryParam = FNoLoggingCategory;
|
||||
using FLogCategoryParam = FLogCategoryBase;
|
||||
#endif
|
||||
|
||||
struct LogParams
|
||||
{
|
||||
bool bToScreen;
|
||||
bool bDisplayNewerOnTop;
|
||||
uint64 ScreenMsgKey;
|
||||
bool DumpStack;
|
||||
FLogCategoryParam& Category;
|
||||
int32 Line;
|
||||
ANSICHAR const* File;
|
||||
ANSICHAR const* Func;
|
||||
};
|
||||
|
||||
inline
|
||||
void LogToFile(FString Message
|
||||
, ELogV Verbosity = ELogV::Log
|
||||
@@ -82,11 +70,9 @@ void LogToFile(FString Message
|
||||
{
|
||||
#if !UE_BUILD_SHIPPING && !NO_LOGGING
|
||||
ELogVerbosity::Type EngineVerbosity = (ELogVerbosity::Type) Verbosity;
|
||||
|
||||
static UE::Logging::Private::FStaticBasicLogDynamicData LOG_Dynamic;
|
||||
static UE::Logging::Private::FStaticBasicLogRecord
|
||||
LOG_Static(TEXT("%s -- %hs %hs(%d)"), File, Line, EngineVerbosity, LOG_Dynamic);
|
||||
|
||||
if ((EngineVerbosity & ELogVerbosity::VerbosityMask) <= ELogVerbosity::COMPILED_IN_MINIMUM_VERBOSITY)
|
||||
{
|
||||
if ((EngineVerbosity & ELogVerbosity::VerbosityMask) <= Category.GetVerbosity())
|
||||
@@ -102,15 +88,19 @@ void LogToFile(FString Message
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
struct LogParams {
|
||||
bool bToScreen = false;
|
||||
float TimeToDisplay = 5.f;
|
||||
FColor DisplayColor = FColor::Cyan;
|
||||
bool bDisplayNewerOnTop = true;
|
||||
uint64 ScreenMsgKey = -1;
|
||||
bool DumpStack = false;
|
||||
};
|
||||
void Log(FString Message
|
||||
, ELogV Verbosity = ELogV::Log
|
||||
, bool bToScreen = false
|
||||
, float TimeToDisplay = 5.f
|
||||
, FColor DisplayColor = FColor::Cyan
|
||||
, bool bDisplayNewerOnTop = true
|
||||
, uint64 ScreenMsgKey = -1
|
||||
, bool DumpStack = false
|
||||
, FLogCategoryParam& Category = LogSaneSlate
|
||||
, LogParams Params = {}
|
||||
, int32 Line = __builtin_LINE()
|
||||
, ANSICHAR const* File = __builtin_FILE()
|
||||
, ANSICHAR const* Func = __builtin_FUNCTION() );
|
||||
|
||||
1
Source/SaneSlate/SaneSlateModule.cpp
Normal file
1
Source/SaneSlate/SaneSlateModule.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "SaneSlateModule.h"
|
||||
10
Source/SaneSlate/SaneSlateModule.h
Normal file
10
Source/SaneSlate/SaneSlateModule.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "Modules/ModuleInterface.h"
|
||||
|
||||
class FSaneSlateModule : public IModuleInterface
|
||||
{
|
||||
public:
|
||||
// void StartupModule() override;
|
||||
// void ShutdownModule() override;
|
||||
};
|
||||
10
Source/SaneSlateEditor/SaneSlateEditor.build.cs
Normal file
10
Source/SaneSlateEditor/SaneSlateEditor.build.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using UnrealBuildTool;
|
||||
|
||||
|
||||
public class SaneSlateEditor : ModuleRules
|
||||
{
|
||||
public SaneSlateEditor(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
1
Source/SaneSlateEditor/SaneSlateEditorLog.cpp
Normal file
1
Source/SaneSlateEditor/SaneSlateEditorLog.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "SaneSlateEditorLog.h"
|
||||
1
Source/SaneSlateEditor/SaneSlateEditorLog.h
Normal file
1
Source/SaneSlateEditor/SaneSlateEditorLog.h
Normal file
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
2
Source/SaneSlateEditor/SaneSlateEditorModule.cpp
Normal file
2
Source/SaneSlateEditor/SaneSlateEditorModule.cpp
Normal file
@@ -0,0 +1,2 @@
|
||||
#include "SaneSlateEditorModule.cpp"
|
||||
|
||||
2
Source/SaneSlateEditor/SaneSlateEditorModule.h
Normal file
2
Source/SaneSlateEditor/SaneSlateEditorModule.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
|
||||
Reference in New Issue
Block a user