Refactor GDK platform settings and tools, expose more options MicrosoftGame.config
This commit is contained in:
130
Source/Engine/Platform/GDK/GDKPlatformSettings.h
Normal file
130
Source/Engine/Platform/GDK/GDKPlatformSettings.h
Normal file
@@ -0,0 +1,130 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#if PLATFORM_GDK || USE_EDITOR
|
||||
|
||||
#include "Engine/Core/Config/PlatformSettingsBase.h"
|
||||
#include "Engine/Core/Math/Color.h"
|
||||
|
||||
/// <summary>
|
||||
/// GDK platform settings.
|
||||
/// </summary>
|
||||
API_CLASS(Namespace="FlaxEditor.Content.Settings") class FLAXENGINE_API GDKPlatformSettings : public SettingsBase
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_MINIMAL(GDKPlatformSettings);
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Game publisher identity name stored in game package manifest (for store).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(100), EditorDisplay(\"General\")")
|
||||
String PublisherName;
|
||||
|
||||
/// <summary>
|
||||
/// Game publisher display name stored in game package manifest (for UI).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(110), EditorDisplay(\"General\")")
|
||||
String PublisherDisplayName;
|
||||
|
||||
/// <summary>
|
||||
/// Application small logo texture of size 150x150 px (asset id).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(200), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.AssetRefEditor\"), AssetReference(typeof(Texture)), EditorDisplay(\"Visuals\")")
|
||||
Guid Square150x150Logo;
|
||||
|
||||
/// <summary>
|
||||
/// Application large logo texture of size 480x480 px (asset id).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(205), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.AssetRefEditor\"), AssetReference(typeof(Texture)), EditorDisplay(\"Visuals\")")
|
||||
Guid Square480x480Logo;
|
||||
|
||||
/// <summary>
|
||||
/// Application small logo texture of size 44x44 px (asset id).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(210), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.AssetRefEditor\"), AssetReference(typeof(Texture)), EditorDisplay(\"Visuals\")")
|
||||
Guid Square44x44Logo;
|
||||
|
||||
/// <summary>
|
||||
/// Application splash screen texture (asset id).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(220), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.AssetRefEditor\"), AssetReference(typeof(Texture)), EditorDisplay(\"Visuals\")")
|
||||
Guid SplashScreenImage;
|
||||
|
||||
/// <summary>
|
||||
/// Application store logo texture (asset id).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(230), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.AssetRefEditor\"), AssetReference(typeof(Texture)), EditorDisplay(\"Visuals\")")
|
||||
Guid StoreLogo;
|
||||
|
||||
/// <summary>
|
||||
/// Application background color.
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(240), DefaultValue(typeof(Color), \"0,0,0,1\"), EditorDisplay(\"Visuals\")")
|
||||
Color BackgroundColor = Color::Black;
|
||||
|
||||
/// <summary>
|
||||
/// Application foreground text theme (light or dark).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(250), EditorDisplay(\"Visuals\")")
|
||||
String ForegroundText = TEXT("light");
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the Titles Xbox Live Title ID, used for identity with Xbox Live services (optional).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(300), EditorDisplay(\"Xbox Live\")")
|
||||
String TitleId;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the Titles Xbox Live Title ID, used for identity with Xbox Live services (optional).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(310), EditorDisplay(\"Xbox Live\")")
|
||||
String StoreId;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies if the title requires Xbox Live connectivity in order to run (optional).
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(320), EditorDisplay(\"Xbox Live\")")
|
||||
bool RequiresXboxLive = false;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies if the Game DVR system component is enabled or not.
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(400), EditorDisplay(\"Media Capture\")")
|
||||
bool GameDVRSystemComponent = true;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies if broadcasting the title should be blocked or allowed.
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(410), EditorDisplay(\"Media Capture\")")
|
||||
bool BlockBroadcast = false;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies if Game DVR of the title should be blocked or allowed.
|
||||
/// </summary>
|
||||
API_FIELD(Attributes="EditorOrder(420), EditorDisplay(\"Media Capture\")")
|
||||
bool BlockGameDVR = false;
|
||||
|
||||
public:
|
||||
|
||||
// [SettingsBase]
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
|
||||
{
|
||||
DESERIALIZE(PublisherName);
|
||||
DESERIALIZE(PublisherDisplayName);
|
||||
DESERIALIZE(Square150x150Logo);
|
||||
DESERIALIZE(Square480x480Logo);
|
||||
DESERIALIZE(Square44x44Logo);
|
||||
DESERIALIZE(SplashScreenImage);
|
||||
DESERIALIZE(StoreLogo);
|
||||
DESERIALIZE(BackgroundColor);
|
||||
DESERIALIZE(TitleId);
|
||||
DESERIALIZE(StoreId);
|
||||
DESERIALIZE(RequiresXboxLive);
|
||||
DESERIALIZE(GameDVRSystemComponent);
|
||||
DESERIALIZE(BlockBroadcast);
|
||||
DESERIALIZE(BlockGameDVR);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -82,6 +82,7 @@ public class Platform : EngineModule
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "UWP", "UWPPlatformSettings.h"));
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "Linux", "LinuxPlatformSettings.h"));
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "Android", "AndroidPlatformSettings.h"));
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "GDK", "GDKPlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform", "XboxOnePlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Platform", "XboxScarlettPlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform", "PS4PlatformSettings.h"));
|
||||
|
||||
Reference in New Issue
Block a user