Table of Contents

Class Group

Namespace
MLEM.Ui.Elements
Assembly
MLEM.Ui.dll

A group element to be used inside of a UiSystem. A group is an element that has no rendering or interaction on its own, but that can aid with automatic placement of child elements.

public class Group : Element, IGenericDataHolder
Inheritance
Group
Implements
Derived
Inherited Members
Extension Methods

Constructors

Group(Anchor, Vector2, bool)

Creates a new group with the given settings

public Group(Anchor anchor, Vector2 size, bool setHeightBasedOnChildren = true)

Parameters

anchor Anchor

The group's anchor

size Vector2

The group's size

setHeightBasedOnChildren bool

Whether the group's height should be based on its children's height, see SetHeightBasedOnChildren.

Group(Anchor, Vector2, bool, bool)

Creates a new group with the given settings

public Group(Anchor anchor, Vector2 size, bool setWidthBasedOnChildren, bool setHeightBasedOnChildren)

Parameters

anchor Anchor

The group's anchor

size Vector2

The group's size

setWidthBasedOnChildren bool

Whether the group's width should be based on its children's width, see SetWidthBasedOnChildren.

setHeightBasedOnChildren bool

Whether the group's height should be based on its children's height, see SetHeightBasedOnChildren.

Methods

Draw(GameTime, SpriteBatch, float, SpriteBatchContext)

Draws this element and all of its children. Override this method to draw the content of custom elements. Note that, when this is called, SpriteBatch.Begin has already been called with custom Transform etc. applied.

public override void Draw(GameTime time, SpriteBatch batch, float alpha, SpriteBatchContext context)

Parameters

time GameTime

The game's time

batch SpriteBatch

The sprite batch to use for drawing

alpha float

The alpha to draw this element and its children with

context SpriteBatchContext

The sprite batch context to use for drawing