// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#if PLATFORM_MAC || USE_EDITOR
#include "../Apple/ApplePlatformSettings.h"
///
/// Mac platform settings.
///
API_CLASS(Sealed, Namespace="FlaxEditor.Content.Settings") class FLAXENGINE_API MacPlatformSettings : public ApplePlatformSettings
{
DECLARE_SCRIPTING_TYPE_MINIMAL(MacPlatformSettings);
///
/// The default game window mode.
///
API_FIELD(Attributes="EditorOrder(110), EditorDisplay(\"Window\")")
GameWindowMode WindowMode = GameWindowMode::Windowed;
///
/// The default game window width (in pixels).
///
API_FIELD(Attributes="EditorOrder(120), EditorDisplay(\"Window\")")
int32 ScreenWidth = 1280;
///
/// The default game window height (in pixels).
///
API_FIELD(Attributes="EditorOrder(130), EditorDisplay(\"Window\")")
int32 ScreenHeight = 720;
///
/// Enables resizing the game window by the user.
///
API_FIELD(Attributes="EditorOrder(140), EditorDisplay(\"Window\")")
bool ResizableWindow = false;
///
/// Enables game running when application window loses focus.
///
API_FIELD(Attributes="EditorOrder(1010), EditorDisplay(\"Other\", \"Run In Background\")")
bool RunInBackground = 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 MacPlatformSettings* Get();
// [SettingsBase]
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) final override
{
ApplePlatformSettings::Deserialize(stream, modifier);
DESERIALIZE(WindowMode);
DESERIALIZE(ScreenWidth);
DESERIALIZE(ScreenHeight);
DESERIALIZE(ResizableWindow);
DESERIALIZE(RunInBackground);
}
};
#if PLATFORM_MAC
typedef MacPlatformSettings PlatformSettings;
#endif
#endif