Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.InvetorySystem.UI.Controls.StoragesGUICollection Class Reference

Detailed Description

Component that implements layout of StorageGUIElement collection.

The controller fully configures required component at the layout to perform a task of displaying of StorageGUIElement collection.

Receives a Storage as a set content and provides API bridge between the data and GUI representations. Encapsulates GUI elements creation process.

Inheritance diagram for Doloro.InvetorySystem.UI.Controls.StoragesGUICollection:
Collaboration diagram for Doloro.InvetorySystem.UI.Controls.StoragesGUICollection:

Public Member Functions

void Set (params Guid[] storageIds)
 Loads storages data from StoragesDatabase.Active by provided ids and instantiates them to the UI. More...
 
void Set (ICollection< Guid > storageIds)
 Loads storages data from StoragesDatabase.Active by provided ids and instantiates them to the UI. More...
 
void Set (ICollection< SourceType > content)
 Loads to UI bunch of SourceTypes. More...
 
void Set (params SourceType[] content)
 Loads to UI bunch of SourceTypes. More...
 
void Add (SourceType item)
 Connects new SourceType source to UI. More...
 
void Clear ()
 Clears entire UI. More...
 
bool Contains (SourceType item)
 Checks is the SourceType connected to UI. More...
 
void CopyTo (SourceType[] array, int arrayIndex)
 Copies references of rented storages to the destination array. More...
 
IEnumerator< SourceType > GetEnumerator ()
 Enumerates sources connected with the UI. More...
 
int IndexOf (SourceType item)
 Looking for GUI element with connected SourceType instance. More...
 
void Insert (int index, SourceType item)
 Inserts GUI element connected to the source to the collection. More...
 
bool Remove (SourceType item)
 Removes GUI element of collection with connected storage. More...
 
void RemoveAt (int index)
 Removes GUI element from GUICollectionHubEventRelay.collection by index. More...
 

Static Public Member Functions

static operator AGUIElement (StoragesGUICollection collection)
 Returns Collection reference. More...
 

Properties

AGUIElementsCollection Collection [get]
 Connected collection of GUI elements.
 
GUICollectionHubEventRelay EventRelay [get]
 Connected event relay handler.
 
AGUIElementsCollection CollectionGUI [get]
 Attached collection GUI.
 
GUIElementType ElementTemplatePrefab [get, set]
 Prefab of the GUI element that will be created for SourceType instance during binding to UI.
 
SourceType this[int index] [get, set]
 Provides access to UI element as connected SourceType. More...
 
int Count [get]
 Count of elements placed at the UI. More...
 
bool IsReadOnly [get]
 Redirects to GUICollectionHubEventRelay.collection property.
 

Member Function Documentation

◆ Add()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Add ( SourceType  item)
inherited

Connects new SourceType source to UI.

Parameters
itemSourceType to connect.

◆ Clear()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Clear ( )
inherited

Clears entire UI.

Not releases rented storages.

◆ Contains()

bool Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Contains ( SourceType  item)
inherited

Checks is the SourceType connected to UI.

Parameters
itemSourceType to search.
Returns
Result of search. true if connected to the UI.

◆ CopyTo()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.CopyTo ( SourceType[]  array,
int  arrayIndex 
)
inherited

Copies references of rented storages to the destination array.

Parameters
arrayDestination array.
arrayIndexStart index to array insert.

In case if GUICollectionHubEventRelay.collection contains elements not derived from GUIElementType such elements will be avoided.

◆ GetEnumerator()

IEnumerator< SourceType > Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.GetEnumerator ( )
inherited

Enumerates sources connected with the UI.

Returns
Sources enumerator.

◆ IndexOf()

int Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.IndexOf ( SourceType  item)
inherited

Looking for GUI element with connected SourceType instance.

Parameters
itemConnected source to search.
Returns
Index of GUI element in GUICollectionHubEventRelay.collection in case if found. -1 otherwise.

◆ Insert()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Insert ( int  index,
SourceType  item 
)
inherited

Inserts GUI element connected to the source to the collection.

Parameters
indexIndexed in collection as insert destination.
itemSource item to GUI attach.

◆ operator AGUIElement()

static Doloro.InvetorySystem.UI.Controls.StoragesGUICollection.operator AGUIElement ( StoragesGUICollection  collection)
explicitstatic

Returns Collection reference.

Parameters
collectionData set controller.

◆ Remove()

bool Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Remove ( SourceType  item)
inherited

Removes GUI element of collection with connected storage.

Parameters
itemConnected storage to detach from UI.
Returns
Is GUI element had been found.

◆ RemoveAt()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.RemoveAt ( int  index)
inherited

Removes GUI element from GUICollectionHubEventRelay.collection by index.

Parameters
indexIndex to remove.

◆ Set() [1/4]

void Doloro.InvetorySystem.UI.DataBridge.StoragesCollectionDataConnector.Set ( ICollection< Guid >  storageIds)
inherited

Loads storages data from StoragesDatabase.Active by provided ids and instantiates them to the UI.

Parameters
storageIdsCollection of StoragesDatabase.StorageContainer

ids to UI binding.

◆ Set() [2/4]

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Set ( ICollection< SourceType >  content)
inherited

Loads to UI bunch of SourceTypes.

Parameters
contentCollection of rented storages.

◆ Set() [3/4]

void Doloro.InvetorySystem.UI.DataBridge.StoragesCollectionDataConnector.Set ( params Guid[]  storageIds)
inherited

Loads storages data from StoragesDatabase.Active by provided ids and instantiates them to the UI.

Parameters
storageIdsCollection of StoragesDatabase.StorageContainer IDs to UI binding.

◆ Set() [4/4]

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Set ( params SourceType[]  content)
inherited

Loads to UI bunch of SourceTypes.

Parameters
contentCollection of rented storages.

Property Documentation

◆ Count

int Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Count
getinherited

Count of elements placed at the UI.

Note that in case if you add a custom UIEngine2.AGUIElement to the GUICollectionHubEventRelay.collection directly then this element will be count as part of collection.

◆ this[int index]

SourceType Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.this[int index]
getsetinherited

Provides access to UI element as connected SourceType.

Parameters
indexIndex of element in UI collection.
Returns
SourceType connected to certain UI element of collection in case if that element instance derived from the GUIElementType. null in case if collection item is manually added UIEngine2.AGUIElement of another type.

In case if UIEngine2.AGUIElement as collection item not derived from GUIElementType then during set operation it will be replaced with Insert(int, SourceType) implementation.


The documentation for this class was generated from the following file: