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
namestringThe name of the window
widthfloatThe width of the window
heightfloatThe height of the window
Properties
fullscreen
Whether this window is currently in fullscreen mode.
public bool fullscreen { get; }
Property Value
maxHeight
The maximum height of this window.
public float maxHeight { get; }
Property Value
maxWidth
The maximum width of this window.
public float maxWidth { get; }
Property Value
minHeight
The minimum height of this window.
public float minHeight { get; }
Property Value
minWidth
The minimum width of this window.
public float minWidth { get; }
Property Value
name
This window's name.
public string name { get; }
Property Value
resizeButton
This window's ResizeButton.
public ResizeButton resizeButton { get; }
Property Value
scrollView
This window's underlying ScrollView.
public ScrollView scrollView { get; }
Property Value
titleBar
This window's TitleBar. Contains the name and close and fullscreen buttons.
public TitleBar titleBar { get; }
Property Value
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
positionVector2The 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
positionVector2The 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
positionVector2The 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
SetMinSize(float, float)
Sets the minimum dimensions for this window.
public void SetMinSize(float width, float height)
Parameters
SetName(string)
Sets the name of this window.
public void SetName(string name)
Parameters
namestringThe 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
themeThemeThe theme to apply