Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
The module provides you with ItemGUIElement
, a main content inspector suitable for Item
content display. The component receives StoragesDatabase.ItemContainer
as content
and loads its key properties to configurated GUI layout.
Explore API:
The inspector can be extended with AItemGUIElementExtension
derived components.
The class proofs components configuration on target game object that simplifies development comparing to manual implementation of AContentInspectorExtension<StoragesDatabase.ItemContainer>
class.
The extension follows ItemGUIControl
events and updates bonded GUI layout elements along with extension internal logic.
Explore API:
To create a custom GUI extension, it’s enough to create a new class derived from AItemGUIElementExtension
. By overriding provided handlers you may follow common ItemGUIControl
events and implement feedback on them.
Following example shows common template of GUI extension class.
You also may find useful deriving the component from the AItemFeatureGUIExtension{FeatureType}
instead of regular AItemGUIElementExtension
. Such a component bonds with a certain AItemFeature
over the Item
instance and follows its internal events and messages encapsulating objects management demands.
Where FEATURE_TYPE
is AItemFeature
derived feature's type.
Using of the component allows dynamically change a GUI along with the feature's state change.
AItemFeatureGUIExtension
derived component calls Item
resource instance. Such an instance has a bond with data base entry and must be destroyed manually in case you need. You may want to do this in case some of custom features takes performance leak, by default such an instance is static and not damage gameplay experience while it stays in on-scene items registry.Explore API: Doloro.InvetorySystem.UI.Extension.AItemFeatureGUIExtension{ FeatureType }