Gorilla.UI.Inventory
Unit Gorilla.UI.Inventory.pasClasses
- TCustomInventoryControl = class ( TControl )
- TInventoryItemNotifyControl = class ( TCustomInventoryControl )
- TInventoryGroup = class ( TCustomInventoryControl )
- TInventoryCollectedItem = class ( TCustomInventoryControl )
- TInventoryFrame = class ( TControl )
Enumerations
- enum TInventoryItemNotifyControlType = ( Quantity, Help, Warning ) ;
Constants
Mics. types
- type TCustomInventoryControlClass = class of TCustomInventoryControl;
- type TInventoryItemNotifyControlClass = class of TInventoryItemNotifyControl;
- type TInventoryGroupClass = class of TInventoryGroup;
- type TInventoryCollectedItemClass = class of TInventoryCollectedItem;
TCustomInventoryControl
The custom component for all inventory ui elements.
Ancestors
Members
Fields
- protected FFrame :
TInventoryFrame
- protected FImages :
TImageList
- protected FInstance :
TObject
- protected FNotifyControls :
:TCustomInventoryControl.:1
Methods
- public constructor Create ( AOwner : TComponent; const AFrame : TInventoryFrame ) ;
- public destructor Destroy ( ) ;
- protected procedure DoUpdateInstance ( ) ; virtual;
- public procedure Clear ( ) ;
- public procedure UpdateInstance ( ) ;
- public function ActivateNotifyControl ( const AType : TInventoryItemNotifyControlType ) : TInventoryItemNotifyControl ; virtual;
- public procedure DeactivateNotifyControl ( const AType : TInventoryItemNotifyControlType ) ; virtual;
Properties
TInventoryItemNotifyControl
The InventoryItemNotifyControl represents a notification area inside of a group or collected-item, f.e.: a counter for the quantity of items.
Ancestors
Members
TInventoryGroup
A inventory grouping component. Use this component to categorize your collected items into groups.
Ancestors
Members
TInventoryCollectedItem
A custom collected item component. Use this component as basis for all of your collected items.
Ancestors
Members
Methods
- public constructor Create ( AOwner : TComponent; const AFrame : TInventoryFrame ) ;
- public destructor Destroy ( ) ;
- protected function GetItem ( ) : TGorillaInventoryCollectable ; virtual;
- protected procedure SetItem ( const AValue : TGorillaInventoryCollectable ) ; virtual;
- protected procedure DoOnClick ( ASender : TObject ) ; virtual;
Properties
TInventoryFrame
A custom inventory frame component to manage a inventory system.
Ancestors
Members
Fields
- private DefaultGroupClass :
TInventoryGroupClass
- private DefaultCollectedClass :
TInventoryCollectedItemClass
- private DefaultNotifyClass :
TInventoryItemNotifyControlClass
- protected FInventory :
TGorillaInventory
- protected FImages :
TImageList
- protected FGroups :
TList<Gorilla.UI.Inventory.TInventoryGroup>
- protected FGroupClass :
TInventoryGroupClass
- protected FItems :
TList<Gorilla.UI.Inventory.TInventoryCollectedItem>
- protected FCollectedClass :
TInventoryCollectedItemClass
- protected FNotifyClass :
TInventoryItemNotifyControlClass
- protected FOnClickItem :
TOnInventoryNotify
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetInventory ( const AValue : TGorillaInventory ) ; virtual;
- public procedure SetDefaultClasses
(
const
AGroupClass :
TInventoryGroupClass; const
ACollectedClass :
TInventoryCollectedItemClass; const
ANotifyClass :
TInventoryItemNotifyControlClass
)
;
class;
Class method to set default classes used for instanciating ui elements. This method should be called in initialization section of your extended UI-Inventory unit.
- public procedure Clear
(
)
;
Clears all inventory ui elements inherited from TCustomInventoryControl from this frame.
- public procedure UpdateInventory
(
)
;
The update inventory method creates all ui elements depending on the linked inventory component automatically.
- public function FindGroupPattern
(
const
AGroup :
TGorillaInventoryGroup
)
: TInventoryGroup
;
Searches for a TInventoryGroup instance linked with this group. If not component can be found, the method returns null.
- public function FindItemPattern
(
const
AItem :
TGorillaInventoryCollectable
)
: TInventoryCollectedItem
;
Searches for a TInventoryCollectedItem instance linked with this item. If not component can be found, the method returns null.
Properties
- published Inventory : TGorillaInventory
- published Images : TImageList
- published GroupClass : TInventoryGroupClass
Overwrite the DefaultGroupClass for instanciating TInventoryGroup components.
read FGroupClass
write FGroupClass - published CollectedClass : TInventoryCollectedItemClass
Overwrite the DefaultCollectedClass for instanciating TInventoryCollectedItem components.
read FCollectedClass
write FCollectedClass - published NotifyClass : TInventoryItemNotifyControlClass
Overwrite the DefaultNotifyClass for instanciating TInventoryItemNotifyControl components.
read FNotifyClass
write FNotifyClass