diff --git a/Source/Editor/GUI/MainMenu.cs b/Source/Editor/GUI/MainMenu.cs index 7c49d85ac..9a2e7ac21 100644 --- a/Source/Editor/GUI/MainMenu.cs +++ b/Source/Editor/GUI/MainMenu.cs @@ -61,7 +61,9 @@ namespace FlaxEditor.GUI public MainMenu(RootControl mainWindow) : base(0, 0, 0, 20) { +#if PLATFORM_WINDOWS _useCustomWindowSystem = !Editor.Instance.Options.Options.Interface.UseNativeWindowSystem; +#endif AutoFocus = false; AnchorPreset = AnchorPresets.HorizontalStretchTop; diff --git a/Source/Editor/GUI/MainMenuButton.cs b/Source/Editor/GUI/MainMenuButton.cs index c009e9c4c..d1ac216f6 100644 --- a/Source/Editor/GUI/MainMenuButton.cs +++ b/Source/Editor/GUI/MainMenuButton.cs @@ -42,12 +42,14 @@ namespace FlaxEditor.GUI Text = text; var style = Style.Current; +#if PLATFORM_WINDOWS if (Editor.Instance.Options.Options.Interface.UseNativeWindowSystem) { BackgroundColorMouseOver = style.BackgroundHighlighted; BackgroundColorMouseOverOpened = style.Background; } else +#endif { BackgroundColorMouseOver = BackgroundColorMouseOverOpened = style.LightBackground * 1.3f; } diff --git a/Source/Editor/Modules/UIModule.cs b/Source/Editor/Modules/UIModule.cs index 6b01986a9..0ed5e379c 100644 --- a/Source/Editor/Modules/UIModule.cs +++ b/Source/Editor/Modules/UIModule.cs @@ -296,7 +296,9 @@ namespace FlaxEditor.Modules InitDockPanel(mainWindow); // Add dummy control for drawing the main window borders if using a custom style +#if PLATFORM_WINDOWS if (!Editor.Options.Options.Interface.UseNativeWindowSystem) +#endif { mainWindow.AddChild(new CustomWindowBorderControl { diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs index 9b80b664c..417808d8c 100644 --- a/Source/Editor/Modules/WindowsModule.cs +++ b/Source/Editor/Modules/WindowsModule.cs @@ -712,7 +712,9 @@ namespace FlaxEditor.Modules settings.Size = new Vector2(1300 * dpiScale, 900 * dpiScale); settings.StartPosition = WindowStartPosition.CenterScreen; +#if PLATFORM_WINDOWS if (!Editor.Instance.Options.Options.Interface.UseNativeWindowSystem) +#endif { settings.HasBorder = false; settings.HasSizingFrame = false; diff --git a/Source/Editor/Options/InterfaceOptions.cs b/Source/Editor/Options/InterfaceOptions.cs index e8929b77b..121361a2c 100644 --- a/Source/Editor/Options/InterfaceOptions.cs +++ b/Source/Editor/Options/InterfaceOptions.cs @@ -44,6 +44,8 @@ namespace FlaxEditor.Options [EditorDisplay("Interface"), EditorOrder(10), Tooltip("Editor User Interface scale. Applied to all UI elements, windows and text. Can be used to scale the interface up on a bigger display. Editor restart required.")] public float InterfaceScale { get; set; } = 1.0f; +#if PLATFORM_WINDOWS + /// /// Gets or sets a value indicating whether use native window title bar. Editor restart required. /// @@ -51,6 +53,8 @@ namespace FlaxEditor.Options [EditorDisplay("Interface"), EditorOrder(70), Tooltip("Determines whether use native window title bar. Editor restart required.")] public bool UseNativeWindowSystem { get; set; } = false; +#endif + /// /// Gets or sets a value indicating whether show selected camera preview in the editor window. ///