using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MLEM.Ui.Elements {
///
/// A that can have custom drawing parameters.
/// Custom drawing parameters include a matrix, as well as a custom call.
/// All of the custom draw group will be drawn with the custom parameters.
///
[Obsolete("CustomDrawGroup mechanics have been moved down to Element, which means custom draw groups are no longer necessary.")]
public class CustomDrawGroup : Group {
///
/// Creates a new custom draw group with the given settings
///
/// The group's anchor
/// The group's size
/// The group's
/// The group's
/// Whether this group should automatically calculate its height based on its children
public CustomDrawGroup(Anchor anchor, Vector2 size, TransformCallback transformGetter = null, BeginDelegate beginImpl = null, bool setHeightBasedOnChildren = true) :
base(anchor, size, setHeightBasedOnChildren) {
this.TransformGetter = transformGetter ?? ((element, time, matrix) => Matrix.Identity);
this.BeginImpl = beginImpl;
}
///
[Obsolete("Use ScaleTransform instead")]
public void ScaleOrigin(float scale, Vector2? origin = null) {
this.ScaleTransform(scale, origin);
}
}
}