API ReferenceSandbox.UI

FloatingWindowclass

Animates the window between its normal bounds and its icon at the bottom of the screen.

object→Panel→FloatingWindow
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.FloatingWindow : Sandbox.UI.Panel

Constructors1

Showing 1 constructors

public FloatingWindow()PUBLICCONSTRUCTOR

Create a window without taking keyboard focus away from its contents.

Methods12

Showing 12 methods

public void BringToFront()PUBLIC

Raise this window among its siblings without changing keyboard focus or its UI layer.

Returns:void—

protected virtual int BuildHash()PROTECTEDVIRTUAL

Returns:int—

protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder tree)PROTECTEDVIRTUAL

ParameterTypeDescription
treeRenderTreeBuilder—
Returns:void—

protected virtual string GetRenderTreeChecksum()PROTECTEDVIRTUAL

Returns:string—

public void Minimize()PUBLIC

Animate the window into a restore button at the screen edge, keeping its contents alive.

Returns:void—

public void MoveTo(Vector2 screenPosition)PUBLIC

Move the window to a position in screen pixels, preserving it when its parent changes.

ParameterTypeDescription
screenPositionVector2—
Returns:void—

public virtual void OnDeleted()PUBLICVIRTUAL

Remove this window from the minimized row when it is deleted.

Returns:void—

public virtual void OnLayout(Sandbox.Rect layoutRect)PUBLICVIRTUAL

Apply the saved position and keep the window inside the viewport using its measured size.

ParameterTypeDescription
layoutRectRect—
Returns:void—

public void RequestClose()PUBLIC

Ask the owner to close the window, or delete it when no handler is supplied.

Returns:void—

public void Restore()PUBLIC

Animate back to the window's size and position and bring it to the front.

Returns:void—

public virtual void Tick()PUBLICVIRTUAL

Update viewport limits and raise the window when a child consumes a mouse press.

Returns:void—

Properties11

Showing 11 properties

public bool Sandbox.UI.FloatingWindow.HasBeenDragged { get; set; }PUBLICGETSET

Whether the user has moved this window from its initial placement.

Returns:bool—

public string Sandbox.UI.FloatingWindow.Icon { get; set; }PUBLICGETSET

The emoji displayed in the titlebar and when this window is minimized.

Returns:string—

public bool Sandbox.UI.FloatingWindow.IsAnimating { get; set; }PUBLICGETSET

Whether the window is travelling between its expanded position and the minimized row.

Returns:bool—

public bool Sandbox.UI.FloatingWindow.IsDragging { get; set; }PUBLICGETSET

Whether a titlebar drag is in progress.

Returns:bool—

public bool Sandbox.UI.FloatingWindow.IsMinimized { get; set; }PUBLICGETSET

Whether this window is showing as an icon at the bottom of the screen.

Returns:bool—

public bool Sandbox.UI.FloatingWindow.IsThrowing { get; set; }PUBLICGETSET

Whether a thrown window is still moving after the mouse was released.

Returns:bool—

public bool Sandbox.UI.FloatingWindow.KeepOnScreen { get; set; }PUBLICGETSET

Keep the expanded window within its root panel, including after the viewport or contents resize.

Returns:bool—

public System.Action Sandbox.UI.FloatingWindow.OnCloseRequested { get; set; }PUBLICGETSET

Handles a close request. When unset, closing deletes the window.

Returns:Action—

public bool Sandbox.UI.FloatingWindow.ShowCloseButton { get; set; }PUBLICGETSET

Whether the default titlebar includes a close button.

Returns:bool—

public bool Sandbox.UI.FloatingWindow.ShowMinimizeButton { get; set; }PUBLICGETSET

Whether the titlebar includes a minimize button.

Returns:bool—

public string Sandbox.UI.FloatingWindow.Title { get; set; }PUBLICGETSET

The text displayed in the default titlebar.

Returns:string—

On this page