Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.action.ItemFramework.Containers.SelectableInventorySync Class Reference
Inheritance diagram for essentials.action.ItemFramework.Containers.SelectableInventorySync:
essentials.action.ItemFramework.Containers.InventorySync essentials.action.ItemFramework.Containers.ISelectableInventory pluginbase.Objects.Syncable.SyncableObject essentials.action.ItemFramework.Containers.IInventory essentials.action.ItemFramework.Containers.IInventory pluginbase.Objects.Syncable.SyncableBase< T > pluginbase.Objects.Syncable.INetSyncable pluginbase.Objects.Syncable.INetWatcher

Public Member Functions

 SelectableInventorySync ()
 
- Public Member Functions inherited from essentials.action.ItemFramework.Containers.InventorySync
 InventorySync ()
 
 InventorySync (int size)
 
- Public Member Functions inherited from pluginbase.Objects.Syncable.SyncableObject
 SyncableObject ()
 Initializes a new instance of the pluginbase.Objects.Syncable.SyncableObject class. More...
 
- Public Member Functions inherited from essentials.action.ItemFramework.Containers.IInventory
int CountItems ()
 Counts all none-null items More...
 

Protected Member Functions

virtual void OnSelectedItemChanged (int idx)
 
virtual void OnSelectedIndexChanged (int idx)
 
override void OnItemChange (int idx)
 
- Protected Member Functions inherited from essentials.action.ItemFramework.Containers.InventorySync
virtual void OnCapacityChange (int capacity, IItem[] overflow)
 
- Protected Member Functions inherited from pluginbase.Objects.Syncable.SyncableObject
sealed override void ResetWatch ()
 Reset variables watched status More...
 
sealed override void TouchRecurse ()
 Touch self, including all children of this syncable object More...
 
sealed override void EncodeTo (BinaryWriter writer, EncodeContext context)
 Encode changes to binary data More...
 
sealed override void DecodeFrom (BinaryReader reader, DecodeContext context)
 Decode changes from binary data More...
 
sealed override void Persist (IPersistObject obj)
 Build up a persistant object for this syncable, including all sync children and persist objects More...
 
sealed override void Load (IReadPersistObject obj)
 Load a given persistent object back into this instance More...
 
- Protected Member Functions inherited from pluginbase.Objects.Syncable.SyncableBase< T >
void Touch ()
 Touch the instance, notifying something has changed More...
 
virtual void OnChanged ()
 Raises the changed event. More...
 

Properties

IItem Selected [get]
 
int SelectedIndex [get, set]
 
- Properties inherited from essentials.action.ItemFramework.Containers.InventorySync
int Capacity [get, set]
 
- Properties inherited from pluginbase.Objects.Syncable.SyncableObject
virtual ushort NetOwnerId [get]
 Gets the network owner of this object (user id) More...
 
- Properties inherited from pluginbase.Objects.Syncable.INetSyncable
INetWatcher Watcher [get, set]
 Who is watching (who to inform of a change) More...
 
bool Modified [get]
 Gets a value indicating whether this pluginbase.Objects.Syncable.INetSyncable is modified. More...
 
- Properties inherited from essentials.action.ItemFramework.Containers.IInventory
int Capacity [get, set]
 Gets or sets the capacity. More...
 
- Properties inherited from essentials.action.ItemFramework.Containers.ISelectableInventory
IItem Selected [get]
 Gets the selected item, or null More...
 
int SelectedIndex [get, set]
 Gets the selected index More...
 

Events

ItemEvent SelectedItemChanged
 Occurs when change selected item changes Both when index changes, or when the current index item chagnes (used, removed, etc) More...
 
ItemEvent SelectedIndexChanged
 Occurs when selected index changes More...
 
- Events inherited from essentials.action.ItemFramework.Containers.InventorySync
ItemEvent ItemChanged
 Occurs when any item changes in the array More...
 
CapacityEvent CapacityChanged
 Occurs when the capacity of the inventory changes More...
 
- Events inherited from pluginbase.Objects.Syncable.SyncableBase< T >
Action< T > Changed
 Event triggered when any change occurs on this object, either locally or over the network More...
 
Action< T > NetUpdate
 Event triggered when a change occurs resulting from a change over the network More...
 
Action< T > Touched
 Event occurs only when an object is first touched. Usually the first instance of a local-change More...
 
- Events inherited from essentials.action.ItemFramework.Containers.IInventory
ItemEvent ItemChanged
 Occurs when item changed in the inventory More...
 
CapacityEvent CapacityChanged
 Occurs when capacity changed. More...
 
- Events inherited from essentials.action.ItemFramework.Containers.ISelectableInventory
ItemEvent SelectedItemChanged
 Occurs when selected item changed. More...
 
ItemEvent SelectedIndexChanged
 Occurs when selected index changed. Will not fire if item that the index is currently selected changes More...
 

Constructor & Destructor Documentation

essentials.action.ItemFramework.Containers.SelectableInventorySync.SelectableInventorySync ( )
53  {
54  }

Member Function Documentation

override void essentials.action.ItemFramework.Containers.SelectableInventorySync.OnItemChange ( int  idx)
protectedvirtual

Reimplemented from essentials.action.ItemFramework.Containers.InventorySync.

69  {
70  base.OnItemChange(idx);
71  if (idx == this.SelectedIndex)
72  {
74  }
75  }
virtual void OnSelectedItemChanged(int idx)
Definition: SelectableInventorySync.cs:56
int SelectedIndex
Definition: SelectableInventorySync.cs:38
virtual void essentials.action.ItemFramework.Containers.SelectableInventorySync.OnSelectedIndexChanged ( int  idx)
protectedvirtual

Attribute: idx

);

63  {
64  if (SelectedIndexChanged != null)
65  SelectedIndexChanged(idx, this[idx]);
66  }
ItemEvent SelectedIndexChanged
Occurs when selected index changes
Definition: SelectableInventorySync.cs:22
virtual void essentials.action.ItemFramework.Containers.SelectableInventorySync.OnSelectedItemChanged ( int  idx)
protectedvirtual

Attribute: idx

);

57  {
58  if (SelectedItemChanged != null)
59  SelectedItemChanged(idx, this[idx]);
60  }
ItemEvent SelectedItemChanged
Occurs when change selected item changes Both when index changes, or when the current index item chag...
Definition: SelectableInventorySync.cs:17

Property Documentation

IItem essentials.action.ItemFramework.Containers.SelectableInventorySync.Selected
get
int essentials.action.ItemFramework.Containers.SelectableInventorySync.SelectedIndex
getset

Event Documentation

ItemEvent essentials.action.ItemFramework.Containers.SelectableInventorySync.SelectedIndexChanged

Occurs when selected index changes

ItemEvent essentials.action.ItemFramework.Containers.SelectableInventorySync.SelectedItemChanged

Occurs when change selected item changes Both when index changes, or when the current index item chagnes (used, removed, etc)


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