Interface IHudCollection<TElementContainer, TElement>
- Namespace
- RichHudFramework.UI
- Assembly
- RichHudClient.dll
Mutable interface for HUD collections supporting decorator-wrapped child elements.
public interface IHudCollection<TElementContainer, TElement> : IReadOnlyHudCollection<TElementContainer, TElement>, IReadOnlyList<TElementContainer>, IReadOnlyCollection<TElementContainer>, IEnumerable<TElementContainer>, IEnumerable where TElementContainer : IHudNodeContainer<TElement>, new() where TElement : HudNodeBase
Type Parameters
TElementContainerType of the container/decorator wrapping each element. Must implement IHudNodeContainer<TElement>.
TElementActual HUD element type stored in each container.
- Inherited Members
Methods
Add(TElementContainer)
Adds a pre-built container to the end of the collection.
void Add(TElementContainer container)
Parameters
containerTElementContainer
Add(TElement)
Adds a raw element by automatically creating and inserting a new container.
void Add(TElement element)
Parameters
elementTElement
AddRange(IReadOnlyList<TElementContainer>)
Adds multiple containers in a single batch operation.
void AddRange(IReadOnlyList<TElementContainer> newContainers)
Parameters
newContainersIReadOnlyList<TElementContainer>
Clear()
Removes all containers from the collection. Regular children remain untouched.
void Clear()
Insert(int, TElementContainer)
Inserts a container at the specified index.
void Insert(int index, TElementContainer container)
Parameters
indexintcontainerTElementContainer
InsertRange(int, IReadOnlyList<TElementContainer>)
Inserts a range of containers starting at the given index.
void InsertRange(int index, IReadOnlyList<TElementContainer> newContainers)
Parameters
indexintnewContainersIReadOnlyList<TElementContainer>
Remove(Func<TElementContainer, bool>)
Removes the first container matching the predicate.
bool Remove(Func<TElementContainer, bool> predicate)
Parameters
Returns
Remove(TElementContainer)
Removes a specific container if it belongs to this collection.
bool Remove(TElementContainer collectionElement)
Parameters
collectionElementTElementContainer
Returns
RemoveAt(int)
Removes the container at the specified index.
bool RemoveAt(int index)
Parameters
indexint
Returns
RemoveRange(int, int)
Removes a range of containers. Does not affect regular (non-collection) children.
void RemoveRange(int index, int count)