Skip to content

WindowBase.cs

Charles Humphrey edited this page Nov 16, 2017 · 1 revision

RandomchaosMGUIBase.UIBaseClasses.WindowBase

This class is the base for all Window code in the basic UI system. It derives from ControlBase

Events

ClosingWindow OnClosingWindowEvent

This is fired when the close button is clicked, but before the final close.

CloseWindow OnCloseWindowEvent

This is fired when the window is closed.

Public Properties

bool IsSizable

If True, the window can be re sized.

Point MinDimensions

This is the minimum size the window can be resized too.

Public Methods

WindowBase(Game game, Rectangle sizeRect, string fontAsset, string titleText, string backgroundAsset = null)

Constructor.

void Update(GameTime gameTime)

As well as calling base.Update(gameTime), this method then goes on to ensure that it's base controls, title bar, close button, re size button are all in the right position and size.