Window

Simple flexable in game windows

Introduction

Part of the Window System of the UX Complete asset

The Window component is meant to be applied to a RectTransform game object aka a UI game object and serves as the primary component of the UX Windows system.

Definition

Fields and Attributes

Events

Focused

Available as both a GameEvent and a UnityEvent.

Occurs when the window takes focus

Lost Focus

Available as both a GameEvetn and UnityEvent.

Occurs when a query for records complets and contains the results of that query

Maximized

Available as both a GameEvent and UnityEvent.

Occurs when the window is maximized

Minimized

Available as both a GameEvent and UnityEvent.

Occurs when the window is minimized

Restored

Available as both a GameEvent and UnityEvent.

Occurs when the window is restored after a min or max operation

Methods

public void SetTransform(RectTransform transform);
public void SetTransform(Vector3 position, Vector2 size);

Sets the windows position and size to match the target paramiters. If a transform is passed in the windows parentage will not change however it will match the target's position and size.

public void Focus();

Sets this window as focused.

public void Move(Vector2 position);

Attempts to move the window to the target position. This respects clamp to parent settings

public void Maximize();

This will cause the window to fill its parent rect. When doing this the position and size pre-operation is recorded and used by the Restore operation.

public void Minimize();

This will cause the window to set its size to the minimal allowed by its configuraiton. When doing this the position and size pre-operation is recorded and used by the Restore operation.

public void Restore();

If currently minimized or maximized this will return the window to its pre operation size. Note that changing the size of a window after it has been minimized or maximized will invalidate this and thus thhe Restore will take no action.

public void SnapTo(WindowSnapToLocation location);

Snaps the window to a target location in its parent e.g. corners and edges.

Last updated