// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#if PLATFORM_UWP || USE_EDITOR
#include "Engine/Core/Config/PlatformSettingsBase.h"
///
/// Universal Windows Platform settings.
///
API_CLASS(sealed, Namespace="FlaxEditor.Content.Settings") class FLAXENGINE_API UWPPlatformSettings : public SettingsBase
{
DECLARE_SCRIPTING_TYPE_MINIMAL(UWPPlatformSettings);
public:
///
/// The preferred launch windowing mode.
///
API_ENUM() enum class WindowMode
{
///
/// The full screen mode
///
FullScreen = 0,
///
/// The view size.
///
ViewSize = 1,
};
///
/// The display orientation modes. Can be combined as flags.
///
API_ENUM(Attributes="Flags") enum class DisplayOrientations
{
///
/// The none.
///
None = 0,
///
/// The landscape.
///
Landscape = 1,
///
/// The landscape flipped.
///
LandscapeFlipped = 2,
///
/// The portrait.
///
Portrait = 4,
///
/// The portrait flipped.
///
PortraitFlipped = 8,
///
/// The all modes.
///
All = Landscape | LandscapeFlipped | Portrait | PortraitFlipped
};
public:
///
/// The preferred launch windowing mode. Always fullscreen on Xbox.
///
API_FIELD(Attributes="EditorOrder(10), DefaultValue(WindowMode.FullScreen), EditorDisplay(\"Window\")")
WindowMode PreferredLaunchWindowingMode = WindowMode::FullScreen;
///
/// The display orientation modes. Can be combined as flags.
///
API_FIELD(Attributes="EditorOrder(20), DefaultValue(DisplayOrientations.All), EditorDisplay(\"Window\")")
DisplayOrientations AutoRotationPreferences = DisplayOrientations::All;
///
/// The location of the package certificate (relative to the project).
///
API_FIELD(Attributes="EditorOrder(1010), DefaultValue(\"\"), EditorDisplay(\"Other\")")
String CertificateLocation;
///
/// Enables support for DirectX 11. Disabling it reduces compiled shaders count.
///
API_FIELD(Attributes="EditorOrder(2000), DefaultValue(true), EditorDisplay(\"Graphics\", \"Support DirectX 11\")")
bool SupportDX11 = true;
///
/// Enables support for DirectX 10 and DirectX 10.1. Disabling it reduces compiled shaders count.
///
API_FIELD(Attributes="EditorOrder(2010), DefaultValue(false), EditorDisplay(\"Graphics\", \"Support DirectX 10\")")
bool SupportDX10 = false;
public:
///
/// Gets the instance of the settings asset (default value if missing). Object returned by this method is always loaded with valid data to use.
///
static UWPPlatformSettings* Get();
// [SettingsBase]
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) final override
{
DESERIALIZE(PreferredLaunchWindowingMode);
DESERIALIZE(AutoRotationPreferences);
DESERIALIZE(CertificateLocation);
DESERIALIZE(SupportDX11);
DESERIALIZE(SupportDX10);
}
};
#if PLATFORM_UWP
typedef UWPPlatformSettings PlatformSettings;
#endif
#endif