/// <summary>
        /// Creates a floating window.
        /// </summary>
        /// <param name="parent">Parent window handle.</param>
        /// <param name="location">Client area location.</param>
        /// <param name="size">Window client area size.</param>
        /// <param name="startPosition">Window start position.</param>
        /// <param name="title">Initial window title.</param>
        internal static Window CreateFloatWindow(RootControl parent, Vector2 location, Vector2 size, WindowStartPosition startPosition, string title)
        {
            // Setup initial window settings
            var settings = CreateWindowSettings.Default;

            settings.Parent                 = (parent as WindowRootControl)?.Window;
            settings.Title                  = title;
            settings.Size                   = size;
            settings.Position               = location;
            settings.MinimumSize            = new Vector2(1);
            settings.MaximumSize            = new Vector2(4096);
            settings.Fullscreen             = false;
            settings.HasBorder              = true;
            settings.SupportsTransparency   = false;
            settings.ActivateWhenFirstShown = true;
            settings.AllowInput             = true;
            settings.AllowMinimize          = true;
            settings.AllowMaximize          = true;
            settings.AllowDragAndDrop       = true;
            settings.IsTopmost              = false;
            settings.IsRegularWindow        = true;
            settings.HasSizingFrame         = true;
            settings.ShowAfterFirstPaint    = false;
            settings.ShowInTaskbar          = true;
            settings.StartPosition          = startPosition;

            // Create window
            return(Platform.CreateWindow(ref settings));
        }
Example #2
0
        /// <summary>
        /// Creates a floating window.
        /// </summary>
        /// <param name="parent">Parent window handle.</param>
        /// <param name="location">Client area location.</param>
        /// <param name="size">Window client area size.</param>
        /// <param name="startPosition">Window start position.</param>
        /// <param name="title">Initial window title.</param>
        internal static FlaxEngine.Window CreateFloatWindow(Window parent, Vector2 location, Vector2 size, WindowStartPosition startPosition, string title)
        {
            // Setup initial window settings
            var settings = CreateWindowSettings.Default;

            settings.Parent                 = parent?.NativeWindow;
            settings.Title                  = title;
            settings.Size                   = size;
            settings.Position               = location;
            settings.MinimumSize            = new Vector2(1);
            settings.MaximumSize            = new Vector2(2000);
            settings.Fullscreen             = false;
            settings.HasBorder              = true;
            settings.SupportsTransparency   = false;
            settings.ActivateWhenFirstShown = true;
            settings.AllowInput             = true;
            settings.AllowMinimize          = true;
            settings.AllowMaximize          = true;
            settings.AllowDragAndDrop       = true;
            settings.IsTopmost              = false;
            settings.IsRegularWindow        = true;
            settings.HasSizingFrame         = true;
            settings.ShowAfterFirstPaint    = false;
            settings.ShowInTaskbar          = false;
            settings.StartPosition          = startPosition;

            // Create window
            return(FlaxEngine.Window.Create(settings));
        }