Class ScreenComponentCollection
A list of screen components with events. The order components are added in determines the order they are updated and drawn.
Namespace: DaggerfallWorkshop.Game.UserInterface
Assembly: Assembly-CSharp.dll
Syntax
public class ScreenComponentCollection : IEnumerable<BaseScreenComponent>, IEnumerable
Constructors
| Improve this Doc View SourceScreenComponentCollection()
Constructor.
Declaration
public ScreenComponentCollection()
ScreenComponentCollection(BaseScreenComponent)
Constructor.
Declaration
public ScreenComponentCollection(BaseScreenComponent parent)
Parameters
Type | Name | Description |
---|---|---|
BaseScreenComponent | parent | Base component hosting this collection. |
Properties
| Improve this Doc View SourceCount
Gets the number of components contained in collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Item[Int32]
Gets component at index.
Declaration
public BaseScreenComponent this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of component. |
Property Value
Type | Description |
---|---|
BaseScreenComponent | Reference to component. |
Methods
| Improve this Doc View SourceAdd(BaseScreenComponent)
Adds a component to collection.
Declaration
public void Add(BaseScreenComponent component)
Parameters
Type | Name | Description |
---|---|---|
BaseScreenComponent | component | Component to add. |
Clear()
Clears the collection.
Declaration
public void Clear()
GetEnumerator()
Gets IEnumerator<T> for the component collection for use with foreach.
Declaration
public IEnumerator<BaseScreenComponent> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<BaseScreenComponent> | IEnumerator of screen components. |
RaiseComponentAddedEvent(BaseScreenComponent)
Raise component added event.
Declaration
protected virtual void RaiseComponentAddedEvent(BaseScreenComponent component)
Parameters
Type | Name | Description |
---|---|---|
BaseScreenComponent | component |
RaiseComponentRemovedEvent(BaseScreenComponent)
Raise component removed event.
Declaration
protected virtual void RaiseComponentRemovedEvent(BaseScreenComponent component)
Parameters
Type | Name | Description |
---|---|---|
BaseScreenComponent | component |
Remove(BaseScreenComponent)
Declaration
public void Remove(BaseScreenComponent component)
Parameters
Type | Name | Description |
---|---|---|
BaseScreenComponent | component |
Events
| Improve this Doc View SourceOnComponentAdded
This event is fired whenever a component is added.
Declaration
public event ScreenComponentCollection.ComponentAddedEventHandler OnComponentAdded
Event Type
Type | Description |
---|---|
ScreenComponentCollection.ComponentAddedEventHandler |
OnComponentRemoved
This event is fired whenever a component is removed.
Declaration
public event ScreenComponentCollection.ComponentAddedEventHandler OnComponentRemoved
Event Type
Type | Description |
---|---|
ScreenComponentCollection.ComponentAddedEventHandler |