Table of Contents

Class Window

Namespace
UILib
Assembly
UILib.dll

A Window object. Like an Overlay but more dynamic.

This object is one of the fundamental building blocks of UILib.

It supports being moved, resized, maximised, closed.

It also has a specially configured ScrollView built in.

public class Window : Overlay
Inheritance
Window
Inherited Members

Constructors

Window(string, float, float)

Initializes a Window.

public Window(string name, float width, float height)

Parameters

name string

The name of the window

width float

The width of the window

height float

The height of the window

Properties

fullscreen

Whether this window is currently in fullscreen mode.

public bool fullscreen { get; }

Property Value

bool

maxHeight

The maximum height of this window.

public float maxHeight { get; }

Property Value

float

maxWidth

The maximum width of this window.

public float maxWidth { get; }

Property Value

float

minHeight

The minimum height of this window.

public float minHeight { get; }

Property Value

float

minWidth

The minimum width of this window.

public float minWidth { get; }

Property Value

float

name

This window's name.

public string name { get; }

Property Value

string

resizeButton

This window's ResizeButton.

public ResizeButton resizeButton { get; }

Property Value

ResizeButton

scrollView

This window's underlying ScrollView.

public ScrollView scrollView { get; }

Property Value

ScrollView

titleBar

This window's TitleBar. Contains the name and close and fullscreen buttons.

public TitleBar titleBar { get; }

Property Value

TitleBar

Methods

BeginFullscreen()

Makes this window fullscreen.

You shouldn't normally need to call this method as it's automatically used internally.

public void BeginFullscreen()

Disable()

Disables interacting with this window.

Note that this also changes the visibility of the window decorations (title bar, scroll bar, resize button).

public override void Disable()

Enable()

Enables interacting with this window.

Note that this also changes the visibility of the window decorations (title bar, scroll bar, resize button).

public override void Enable()

EndFullscreen()

Returns this window to a windowed state.

You shouldn't normally need to call this method as it's automatically used internally.

public void EndFullscreen()

EndFullscreen(Vector2)

Returns this window to a windowed state and also to a given position.

You shouldn't normally need to call this method as it's automatically used internally.

public void EndFullscreen(Vector2 position)

Parameters

position Vector2

The world position to restore to

OnBeginDrag(Vector2)

Handles this Window being dragged from anywhere (not just the top bar).

protected override void OnBeginDrag(Vector2 position)

Parameters

position Vector2

The position the drag started at

OnDrag(Vector2)

Handles this Window being dragged from anywhere (not just the top bar).

protected override void OnDrag(Vector2 position)

Parameters

position Vector2

The position dragged to

ScrollToBottom()

Scroll to the bottom of this window.

public void ScrollToBottom()

ScrollToTop()

Scroll to the top of this window.

public void ScrollToTop()

SetMaxSize(float, float)

Sets the maximum dimensions for this window.

public void SetMaxSize(float width, float height)

Parameters

width float

The maximum width

height float

The maximum height

SetMinSize(float, float)

Sets the minimum dimensions for this window.

public void SetMinSize(float width, float height)

Parameters

width float

The minimum width

height float

The minimum height

SetName(string)

Sets the name of this window.

public void SetName(string name)

Parameters

name string

The window's new name

SetThisTheme(Theme)

Allows setting the theme of this window.

This handles setting the theme specifically for this object, not its children. It's protected to allow overriding if you were to create a subclass.

In most cases, you'd probably want to use SetTheme(Theme) instead.

protected override void SetThisTheme(Theme theme)

Parameters

theme Theme

The theme to apply