Search Results for

    Show / Hide Table of Contents

    Class CoveringGroup

    A covering group is a group that has additional functionality. This functionality includes displaying a gradient background that can be clicked on to exit, adding a close button to any MLEM.Ui.Elements.Panel added, and displaying an opening and closing animation. To close a covering group while keeping animations and closing conditions in mind, use Close(Boolean).

    Inheritance
    System.Object
    MLEM.Misc.GenericDataHolder
    MLEM.Ui.Elements.Element
    MLEM.Ui.Elements.Group
    CoveringGroup
    Implements
    MLEM.Misc.IGenericDataHolder
    System.IDisposable
    Inherited Members
    MLEM.Ui.Elements.Element.Epsilon
    MLEM.Ui.Elements.Element.Controls
    MLEM.Ui.Elements.Element.ScrollOffset
    MLEM.Ui.Elements.Element.Transform
    MLEM.Ui.Elements.Element.BeginImpl
    MLEM.Ui.Elements.Element.SelectionIndicator
    MLEM.Ui.Elements.Element.ActionSound
    MLEM.Ui.Elements.Element.SecondActionSound
    MLEM.Ui.Elements.Element.Padding
    MLEM.Ui.Elements.Element.OnDrawn
    MLEM.Ui.Elements.Element.OnUpdated
    MLEM.Ui.Elements.Element.OnPressed
    MLEM.Ui.Elements.Element.OnSecondaryPressed
    MLEM.Ui.Elements.Element.OnSelected
    MLEM.Ui.Elements.Element.OnDeselected
    MLEM.Ui.Elements.Element.OnMouseEnter
    MLEM.Ui.Elements.Element.OnMouseExit
    MLEM.Ui.Elements.Element.OnTouchEnter
    MLEM.Ui.Elements.Element.OnTouchExit
    MLEM.Ui.Elements.Element.OnTextInput
    MLEM.Ui.Elements.Element.OnAreaUpdated
    MLEM.Ui.Elements.Element.OnStyleInit
    MLEM.Ui.Elements.Element.OnMousedElementChanged
    MLEM.Ui.Elements.Element.OnTouchedElementChanged
    MLEM.Ui.Elements.Element.OnSelectedElementChanged
    MLEM.Ui.Elements.Element.GetTabNextElement
    MLEM.Ui.Elements.Element.GetGamepadNextElement
    MLEM.Ui.Elements.Element.OnChildAdded
    MLEM.Ui.Elements.Element.OnChildRemoved
    MLEM.Ui.Elements.Element.OnAddedToUi
    MLEM.Ui.Elements.Element.OnRemovedFromUi
    MLEM.Ui.Elements.Element.OnDisposed
    MLEM.Ui.Elements.Element.Children
    MLEM.Ui.Elements.Element.AddChild<T>(T, System.Int32)
    MLEM.Ui.Elements.Element.RemoveChild(MLEM.Ui.Elements.Element)
    MLEM.Ui.Elements.Element.RemoveChildren(System.Func<MLEM.Ui.Elements.Element, System.Boolean>)
    MLEM.Ui.Elements.Element.SetSortedChildrenDirty()
    MLEM.Ui.Elements.Element.UpdateSortedChildrenIfDirty()
    MLEM.Ui.Elements.Element.ForceUpdateSortedChildren()
    MLEM.Ui.Elements.Element.SetAreaDirty()
    MLEM.Ui.Elements.Element.UpdateAreaIfDirty()
    MLEM.Ui.Elements.Element.ForceUpdateArea()
    MLEM.Ui.Elements.Element.SetAreaAndUpdateChildren(MLEM.Misc.RectangleF)
    MLEM.Ui.Elements.Element.CalcActualSize(MLEM.Misc.RectangleF)
    MLEM.Ui.Elements.Element.GetAreaForAutoAnchors()
    MLEM.Ui.Elements.Element.GetLowestChild(System.Func<MLEM.Ui.Elements.Element, System.Boolean>)
    MLEM.Ui.Elements.Element.GetRightmostChild(System.Func<MLEM.Ui.Elements.Element, System.Boolean>)
    MLEM.Ui.Elements.Element.GetLowestOlderSibling(System.Func<MLEM.Ui.Elements.Element, System.Boolean>)
    MLEM.Ui.Elements.Element.GetOlderSibling(System.Func<MLEM.Ui.Elements.Element, System.Boolean>)
    MLEM.Ui.Elements.Element.GetSiblings(System.Func<MLEM.Ui.Elements.Element, System.Boolean>)
    MLEM.Ui.Elements.Element.GetChildren<T>(System.Func<T, System.Boolean>, System.Boolean, System.Boolean)
    MLEM.Ui.Elements.Element.GetChildren(System.Func<MLEM.Ui.Elements.Element, System.Boolean>, System.Boolean, System.Boolean)
    MLEM.Ui.Elements.Element.GetParentTree()
    MLEM.Ui.Elements.Element.GetRelevantChildren()
    MLEM.Ui.Elements.Element.Update(Microsoft.Xna.Framework.GameTime)
    MLEM.Ui.Elements.Element.DrawTransformed(Microsoft.Xna.Framework.GameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch, System.Single, Microsoft.Xna.Framework.Graphics.BlendState, Microsoft.Xna.Framework.Graphics.SamplerState, Microsoft.Xna.Framework.Graphics.DepthStencilState, Microsoft.Xna.Framework.Graphics.Effect, Microsoft.Xna.Framework.Matrix)
    MLEM.Ui.Elements.Element.DrawTransformed(Microsoft.Xna.Framework.GameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch, System.Single, MLEM.Graphics.SpriteBatchContext)
    MLEM.Ui.Elements.Element.Draw(Microsoft.Xna.Framework.GameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch, System.Single, Microsoft.Xna.Framework.Graphics.BlendState, Microsoft.Xna.Framework.Graphics.SamplerState, Microsoft.Xna.Framework.Graphics.DepthStencilState, Microsoft.Xna.Framework.Graphics.Effect, Microsoft.Xna.Framework.Matrix)
    MLEM.Ui.Elements.Element.DrawEarly(Microsoft.Xna.Framework.GameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch, System.Single, Microsoft.Xna.Framework.Graphics.BlendState, Microsoft.Xna.Framework.Graphics.SamplerState, Microsoft.Xna.Framework.Graphics.DepthStencilState, Microsoft.Xna.Framework.Graphics.Effect, Microsoft.Xna.Framework.Matrix)
    MLEM.Ui.Elements.Element.GetElementUnderPos(Microsoft.Xna.Framework.Vector2)
    MLEM.Ui.Elements.Element.Dispose()
    MLEM.Ui.Elements.Element.AndChildren(System.Action<MLEM.Ui.Elements.Element>)
    MLEM.Ui.Elements.Element.ReorderChildren(System.Comparison<MLEM.Ui.Elements.Element>)
    MLEM.Ui.Elements.Element.ReverseChildren(System.Int32, System.Nullable<System.Int32>)
    MLEM.Ui.Elements.Element.ScaleTransform(System.Single, System.Nullable<Microsoft.Xna.Framework.Vector2>)
    MLEM.Ui.Elements.Element.InitStyle(MLEM.Ui.Style.UiStyle)
    MLEM.Ui.Elements.Element.OnChildAreaDirty(MLEM.Ui.Elements.Element, System.Boolean)
    MLEM.Ui.Elements.Element.TransformInverse(Microsoft.Xna.Framework.Vector2)
    MLEM.Ui.Elements.Element.TransformInverseAll(Microsoft.Xna.Framework.Vector2)
    MLEM.Ui.Elements.Element.AddedToUi(MLEM.Ui.UiSystem, MLEM.Ui.RootElement)
    MLEM.Ui.Elements.Element.RemovedFromUi()
    MLEM.Ui.Elements.Element.System
    MLEM.Ui.Elements.Element.Parent
    MLEM.Ui.Elements.Element.Root
    MLEM.Ui.Elements.Element.Scale
    MLEM.Ui.Elements.Element.Anchor
    MLEM.Ui.Elements.Element.Size
    MLEM.Ui.Elements.Element.ScaledSize
    MLEM.Ui.Elements.Element.AutoSizeAddedAbsolute
    MLEM.Ui.Elements.Element.ScaledAutoSizeAddedAbsolute
    MLEM.Ui.Elements.Element.PositionOffset
    MLEM.Ui.Elements.Element.ScaledOffset
    MLEM.Ui.Elements.Element.ScaledPadding
    MLEM.Ui.Elements.Element.ScaledChildPadding
    MLEM.Ui.Elements.Element.ChildPaddedArea
    MLEM.Ui.Elements.Element.UnscrolledArea
    MLEM.Ui.Elements.Element.Area
    MLEM.Ui.Elements.Element.DisplayArea
    MLEM.Ui.Elements.Element.ScaledScrollOffset
    MLEM.Ui.Elements.Element.IsHidden
    MLEM.Ui.Elements.Element.Priority
    MLEM.Ui.Elements.Element.CanBeSelected
    MLEM.Ui.Elements.Element.CanBeMoused
    MLEM.Ui.Elements.Element.CanBePressed
    MLEM.Ui.Elements.Element.CanAutoAnchorsAttach
    MLEM.Ui.Elements.Element.SetWidthBasedOnChildren
    MLEM.Ui.Elements.Element.SetHeightBasedOnChildren
    MLEM.Ui.Elements.Element.TreatSizeAsMinimum
    MLEM.Ui.Elements.Element.TreatSizeAsMaximum
    MLEM.Ui.Elements.Element.PreventParentSpill
    MLEM.Ui.Elements.Element.DrawAlpha
    MLEM.Ui.Elements.Element.IsMouseOver
    MLEM.Ui.Elements.Element.IsSelected
    MLEM.Ui.Elements.Element.AreaDirty
    MLEM.Ui.Elements.Element.AutoNavGroup
    MLEM.Ui.Elements.Element.Style
    MLEM.Ui.Elements.Element.ChildPadding
    MLEM.Ui.Elements.Element.SortedChildren
    MLEM.Ui.Elements.Element.Input
    MLEM.Ui.Elements.Element.ParentArea
    MLEM.Misc.GenericDataHolder.SetData(System.String, System.Object)
    MLEM.Misc.GenericDataHolder.SetData<T>(System.String, T)
    MLEM.Misc.GenericDataHolder.GetData<T>(System.String)
    MLEM.Misc.GenericDataHolder.GetDataKeys()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: TinyLife.Uis
    Assembly: Tiny Life.dll
    Syntax
    public class CoveringGroup : Group, IGenericDataHolder, IDisposable

    Constructors

    CoveringGroup(Boolean, Func<CoveringGroup, Boolean>, Boolean, Boolean)

    Creates a new covering group with the given settings.

    Declaration
    public CoveringGroup(bool background = true, Func<CoveringGroup, bool> exitCondition = null, bool hasCloseButton = true, bool openFancy = true)
    Parameters
    Type Name Description
    System.Boolean background

    Whether a background should be rendered behind this covering group.

    System.Func<CoveringGroup, System.Boolean> exitCondition

    A condition that determines whether this covering group can be closed by clicking the close button or the background. If this is null, the ui can always be closed.

    System.Boolean hasCloseButton

    Whether a close button should be added to the first MLEM.Ui.Elements.Panel that is added as a child

    System.Boolean openFancy

    Whether an opening animation should play when opening this covering group. Note that, if UiAnimations is disabled, this value will be ignored.

    Methods

    Close(Boolean)

    Closes this covering group, optionally displaying a closing animation. Note that this method ignores the covering group's exit condition.

    Declaration
    public void Close(bool closeFancy = true)
    Parameters
    Type Name Description
    System.Boolean closeFancy

    Whether a closing animation should display. Note that, if UiAnimations is disabled, this value will be ignored.

    Draw(GameTime, SpriteBatch, Single, SpriteBatchContext)

    Declaration
    public override void Draw(GameTime time, SpriteBatch batch, float alpha, SpriteBatchContext context)
    Parameters
    Type Name Description
    Microsoft.Xna.Framework.GameTime time
    Microsoft.Xna.Framework.Graphics.SpriteBatch batch
    System.Single alpha
    MLEM.Graphics.SpriteBatchContext context
    Overrides
    MLEM.Ui.Elements.Group.Draw(Microsoft.Xna.Framework.GameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch, System.Single, MLEM.Graphics.SpriteBatchContext)

    TryClose(Boolean)

    Closes this covering group, optionally displaying a closing animation. This method does nothing if the exit condition doesn't apply.

    Declaration
    public void TryClose(bool closeFancy = true)
    Parameters
    Type Name Description
    System.Boolean closeFancy

    Whether a closing animation should display. Note that, if UiAnimations is disabled, this value will be ignored.

    Implements

    MLEM.Misc.IGenericDataHolder
    System.IDisposable

    Extension Methods

    Extensions.JsonCopy<T>(T)
    Extensions.IsActiveRoot(Element)
    Extensions.AddProgressArrows(Element, Func<Single>, Func<Single>, Func<Single>, Func<Color>)
    ☀
    ☾
    In This Article
    Back to top
    © 2021-2023 Ellpeck Games, Top Hat Studios – Impressum – Privacy – Status
    ☀
    ☾