Class Group
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
AnchorThe group's anchor
size
Vector2The group's size
setHeightBasedOnChildren
boolWhether 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
AnchorThe group's anchor
size
Vector2The group's size
setWidthBasedOnChildren
boolWhether the group's width should be based on its children's width, see SetWidthBasedOnChildren.
setHeightBasedOnChildren
boolWhether 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
GameTimeThe game's time
batch
SpriteBatchThe sprite batch to use for drawing
alpha
floatThe alpha to draw this element and its children with
context
SpriteBatchContextThe sprite batch context to use for drawing