Search Results for

    Show / Hide Table of Contents

    Class GameWindow

    Provides in-editor play mode simulation.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.ScrollableControl
    Panel
    DockWindow
    EditorWindow
    GameWindow
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    EditorWindow.Editor
    EditorWindow.IsEditingItem(ContentItem)
    EditorWindow.OnSceneSaving(Scene, Guid)
    EditorWindow.OnSceneSaved(Scene, Guid)
    EditorWindow.OnSceneSaveError(Scene, Guid)
    EditorWindow.OnSceneLoading(Scene, Guid)
    EditorWindow.OnSceneLoaded(Scene, Guid)
    EditorWindow.OnSceneLoadError(Scene, Guid)
    EditorWindow.OnSceneUnloading(Scene, Guid)
    EditorWindow.OnSceneUnloaded(Scene, Guid)
    EditorWindow.OnPlayBeginning()
    EditorWindow.OnInit()
    EditorWindow.OnUpdate()
    EditorWindow.OnExit()
    EditorWindow.OnEditorStateChanged()
    EditorWindow.OnDestroy()
    DockWindow._masterPanel
    DockWindow._dockedTo
    DockWindow.InputActions
    DockWindow.ShowFloating()
    DockWindow.ShowFloating(WindowStartPosition)
    DockWindow.ShowFloating(Float2, WindowStartPosition)
    DockWindow.ShowFloating(Float2, Float2, WindowStartPosition)
    DockWindow.Show(DockState, DockPanel, Boolean, Nullable<Single>)
    DockWindow.Show(DockState, DockWindow)
    DockWindow.FocusOrShow()
    DockWindow.FocusOrShow(DockState)
    DockWindow.Hide()
    DockWindow.Close(ClosingReason)
    DockWindow.SelectTab(Boolean)
    DockWindow.BringToFront()
    DockWindow.OnUnlink()
    DockWindow.Undock()
    DockWindow.OnClosing(ClosingReason)
    DockWindow.OnClose()
    DockWindow.OnShow()
    DockWindow.LayoutSerializeSplitter(XmlWriter, String, SplitPanel)
    DockWindow.LayoutDeserializeSplitter(XmlElement, String, SplitPanel)
    DockWindow.Focus()
    DockWindow.PerformLayoutBeforeChildren()
    DockWindow.HideOnClose
    DockWindow.MasterPanel
    DockWindow.ParentDockPanel
    DockWindow.IsDocked
    DockWindow.IsSelected
    DockWindow.IsHidden
    DockWindow.DefaultSize
    DockWindow.SerializationTypename
    DockWindow.Title
    DockWindow.Icon
    DockWindow.TitleSize
    Panel.SetViewOffset(Float2)
    Panel.FastScroll()
    Panel.ScrollViewTo(Control, Boolean)
    Panel.ScrollViewTo(Float2, Boolean)
    Panel.ScrollViewTo(Rectangle, Boolean)
    Panel.OnMouseWheel(Float2, Single)
    Panel.RemoveChildren()
    Panel.DisposeChildren()
    Panel.OnChildResized(Control)
    Panel.ContainsPoint(Float2, Boolean)
    Panel.IntersectsChildContent(Control, Float2, Float2)
    Panel.PerformLayout(Boolean)
    Panel.ArrangeAndGetBounds()
    Panel.Arrange()
    Panel.GetDesireClientArea(Rectangle)
    Panel.OnDragMove(Float2, DragData)
    Panel.ViewBottom
    Panel.ControlsBounds
    Panel.ScrollBars
    Panel.ScrollBarsSize
    Panel.AlwaysShowScrollbars
    Panel.ScrollMargin
    Panel.ScrollbarTrackColor
    Panel.ScrollbarThumbColor
    Panel.ScrollbarThumbSelectedColor
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    ContainerControl.AddChild<T>()
    ContainerControl.AddChild<T>(T)
    ContainerControl.RemoveChild(Control)
    ContainerControl.GetChild(Int32)
    ContainerControl.GetChild<T>()
    ContainerControl.GetChildIndex(Control)
    ContainerControl.GetChildIndexAt(Float2)
    ContainerControl.GetChildAt(Float2)
    ContainerControl.GetChildAt(Float2, Func<Control, Boolean>)
    ContainerControl.GetChildAtRecursive(Float2)
    ContainerControl.GetClientArea()
    ContainerControl.SortChildren()
    ContainerControl.SortChildrenRecursive()
    ContainerControl.OnChildrenChanged()
    ContainerControl.CanNavigateChild(Control)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.Update(Single)
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.DrawChildren()
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseMove(Float2)
    ContainerControl.OnMouseUp(Float2, MouseButton)
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)
    ContainerControl.IsTouchPointerOver(Int32)
    ContainerControl.OnTouchEnter(Float2, Int32)
    ContainerControl.OnTouchDown(Float2, Int32)
    ContainerControl.OnTouchMove(Float2, Int32)
    ContainerControl.OnTouchUp(Float2, Int32)
    ContainerControl.OnTouchLeave(Int32)
    ContainerControl.OnCharInput(Char)
    ContainerControl.OnKeyUp(KeyboardKeys)
    ContainerControl.OnDragEnter(Float2, DragData)
    ContainerControl.OnDragLeave()
    ContainerControl.OnDragDrop(Float2, DragData)
    ContainerControl.OnSizeChanged()
    ContainerControl.Children
    ContainerControl.ChildrenCount
    ContainerControl.HasChildren
    ContainerControl.ContainsFocus
    ContainerControl.ClipChildren
    ContainerControl.CullChildren
    ContainerControl.IsTouchOver
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Defocus()
    Control.OnGotFocus()
    Control.OnLostFocus()
    Control.Focus(Control)
    Control.StartMouseCapture(Boolean)
    Control.EndMouseCapture()
    Control.OnEndMouseCapture()
    Control.GetNavTarget(NavDirection)
    Control.GetNavOrigin(NavDirection)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnTouchLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    Control.IntersectsContent(Float2, Float2)
    Control.PointToParent(ContainerControl, Float2)
    Control.PointToParent(Float2)
    Control.PointToParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(ContainerControl, Float2)
    Control.PointToWindow(Float2)
    Control.PointFromWindow(Float2)
    Control.PointToScreen(Float2)
    Control.PointFromScreen(Float2)
    Control.OnLocationChanged()
    Control.SetScaleInternal(Float2)
    Control.SetPivotInternal(Float2)
    Control.SetShearInternal(Float2)
    Control.SetRotationInternal(Single)
    Control.OnVisibleChanged()
    Control.OnParentChangedInternal()
    Control.AddUpdateCallbacks(RootControl)
    Control.RemoveUpdateCallbacks(RootControl)
    Control.SetUpdate(Control.UpdateDelegate, Control.UpdateDelegate)
    Control.OnParentResized()
    Control.CompareTo(Object)
    Control.Compare(Control)
    Control.Top
    Control.Bottom
    Control.Left
    Control.Right
    Control.UpperLeft
    Control.UpperRight
    Control.BottomRight
    Control.BottomLeft
    Control.Scale
    Control.Pivot
    Control.Shear
    Control.Rotation
    Control.HasParent
    Control.BackgroundColor
    Control.BackgroundBrush
    Control.Enabled
    Control.EnabledInHierarchy
    Control.Visible
    Control.VisibleInHierarchy
    Control.IsDisposing
    Control.Root
    Control.RootWindow
    Control.DpiScale
    Control.ScreenPos
    Control.AutoFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsDragOver
    Control.Tooltip
    Control.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEditor.Windows
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public class GameWindow : EditorWindow, IComparable, IDrawable

    Constructors

    GameWindow(Editor)

    Initializes a new instance of the GameWindow class.

    Declaration
    public GameWindow(Editor editor)
    Parameters
    Editor editor

    The editor.

    Properties

    AudioMuted

    Gets or set a value indicating whether Audio is muted.

    Declaration
    public bool AudioMuted { get; set; }
    Property Value
    System.Boolean

    AudioVolume

    Gets or sets a value that set the audio volume.

    Declaration
    public float AudioVolume { get; set; }
    Property Value
    System.Single

    CanOpenContentFinder

    Gets a value indicating whether this window can open content finder popup.

    Declaration
    protected override bool CanOpenContentFinder { get; }
    Property Value
    System.Boolean

    Overrides
    EditorWindow.CanOpenContentFinder

    CanUseNavigation

    Gets a value indicating whether this window can use UI navigation (tab/enter).

    Declaration
    protected override bool CanUseNavigation { get; }
    Property Value
    System.Boolean

    Overrides
    EditorWindow.CanUseNavigation

    CenterMouseOnFocus

    Gets or sets a value indicating whether center mouse position on window focus in play mode. Helps when working with games that lock mouse cursor.

    Declaration
    public bool CenterMouseOnFocus { get; set; }
    Property Value
    System.Boolean

    EditGUI

    Gets or sets a value indicating whether allow editing game GUI in the view or keep it visible-only.

    Declaration
    public bool EditGUI { get; set; }
    Property Value
    System.Boolean

    FocusOnPlayOption

    Gets or sets a value indicating what panel should be focused when play mode start.

    Declaration
    public InterfaceOptions.PlayModeFocus FocusOnPlayOption { get; set; }
    Property Value
    InterfaceOptions.PlayModeFocus

    ShowDebugDraw

    Gets or sets a value indicating whether show Debug Draw shapes in the view or keep it hidden.

    Declaration
    public bool ShowDebugDraw { get; set; }
    Property Value
    System.Boolean

    ShowGUI

    Gets or sets a value indicating whether show game GUI in the view or keep it hidden.

    Declaration
    public bool ShowGUI { get; set; }
    Property Value
    System.Boolean

    UseLayoutData

    Gets a value indicating whether window uses custom layout data.

    Declaration
    public override bool UseLayoutData { get; }
    Property Value
    System.Boolean

    Overrides
    DockWindow.UseLayoutData

    Viewport

    Gets the viewport.

    Declaration
    public RenderOutputControl Viewport { get; }
    Property Value
    FlaxEngine.GUI.RenderOutputControl

    Methods

    Draw()

    Draw the control and the children.

    Declaration
    public override void Draw()
    Overrides
    Panel.Draw()

    FocusGameViewport()

    Focuses the game viewport. Shows the window if hidden or unselected.

    Declaration
    public void FocusGameViewport()

    OnEndContainsFocus()

    Action fired when control lost 'Contains Focus' state

    Declaration
    public override void OnEndContainsFocus()
    Overrides
    Control.OnEndContainsFocus()

    OnKeyDown(KeyboardKeys)

    When key goes down

    Declaration
    public override bool OnKeyDown(KeyboardKeys key)
    Parameters
    KeyboardKeys key

    Key value

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    EditorWindow.OnKeyDown(KeyboardKeys)

    OnLayoutDeserialize()

    Called when during windows layout deserialization if window has no layout data to load. Can be used to restore default UI layout.

    Declaration
    public override void OnLayoutDeserialize()
    Overrides
    DockWindow.OnLayoutDeserialize()

    OnLayoutDeserialize(XmlElement)

    Called when during windows layout deserialization. Each window can use it to load custom interface data (eg. splitter position).

    Declaration
    public override void OnLayoutDeserialize(XmlElement node)
    Parameters
    System.Xml.XmlElement node

    The Xml document node.

    Overrides
    DockWindow.OnLayoutDeserialize(XmlElement)

    OnLayoutSerialize(XmlWriter)

    Called when during windows layout serialization. Each window can use it to store custom interface data (eg. splitter position).

    Declaration
    public override void OnLayoutSerialize(XmlWriter writer)
    Parameters
    System.Xml.XmlWriter writer

    The Xml writer.

    Overrides
    DockWindow.OnLayoutSerialize(XmlWriter)

    OnMouseDown(Float2, MouseButton)

    When mouse goes down over control's area

    Declaration
    public override bool OnMouseDown(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    Panel.OnMouseDown(Float2, MouseButton)

    OnMouseLeave()

    When mouse leaves control's area

    Declaration
    public override void OnMouseLeave()
    Overrides
    ContainerControl.OnMouseLeave()

    OnNavigate(NavDirection, Float2, Control, List<Control>)

    Performs the UI navigation for this control.

    Declaration
    public override Control OnNavigate(NavDirection direction, Float2 location, Control caller, List<Control> visited)
    Parameters
    NavDirection direction

    The navigation direction.

    Float2 location

    The navigation start location (in the control-space).

    Control caller

    The control that calls the event.

    System.Collections.Generic.List<Control> visited

    The list with visited controls. Used to skip recursive navigation calls when doing traversal across the UI hierarchy.

    Returns
    Control

    The target navigation control or null if didn't performed any navigation.

    Overrides
    ContainerControl.OnNavigate(NavDirection, Float2, Control, List<Control>)

    OnPlayBegin()

    Called when Editor is entering play mode.

    Declaration
    public override void OnPlayBegin()
    Overrides
    EditorWindow.OnPlayBegin()

    OnPlayEnd()

    Called when Editor leaves the play mode.

    Declaration
    public override void OnPlayEnd()
    Overrides
    EditorWindow.OnPlayEnd()

    OnShowContextMenu(ContextMenu)

    Called when dock panel wants to show the context menu for this window. Can be used to inject custom buttons and items to the context menu (on top).

    Declaration
    public override void OnShowContextMenu(ContextMenu menu)
    Parameters
    FlaxEditor.GUI.ContextMenu.ContextMenu menu

    The menu.

    Overrides
    DockWindow.OnShowContextMenu(ContextMenu)

    OnStartContainsFocus()

    Action fired when control gets 'Contains Focus' state

    Declaration
    public override void OnStartContainsFocus()
    Overrides
    Control.OnStartContainsFocus()

    SetWindowMode(InterfaceOptions.GameWindowMode)

    Apply the selected window mode to the game window.

    Declaration
    public void SetWindowMode(InterfaceOptions.GameWindowMode mode)
    Parameters
    InterfaceOptions.GameWindowMode mode

    TakeScreenshot()

    Takes the screenshot of the current viewport.

    Declaration
    public void TakeScreenshot()

    TakeScreenshot(String)

    Takes the screenshot of the current viewport.

    Declaration
    public void TakeScreenshot(string path)
    Parameters
    System.String path

    The output file path.

    UnlockMouseInPlay()

    Unlocks the mouse if game window is focused during play mode.

    Declaration
    public void UnlockMouseInPlay()

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    EditorWindow
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat