TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.InventoryEngine.InventoryDetails Class Reference

A class used to display an item's details in GUI. More...

Inheritance diagram for MoreMountains.InventoryEngine.InventoryDetails:
MoreMountains.Tools.MMEventListener< T > MoreMountains.Tools.MMEventListenerBase

Public Member Functions

virtual void DisplayDetails (InventoryItem item)
 Starts the display coroutine or the panel's fade depending on whether or not the current slot is empty.
virtual void OnMMEvent (MMInventoryEvent inventoryEvent)
 Catches MMInventoryEvents and displays details if needed.
Public Member Functions inherited from MoreMountains.Tools.MMEventListener< T >
void OnMMEvent (T eventType)

Public Attributes

string TargetInventoryName
 the reference inventory from which we'll display item details
string PlayerID = "Player1"
bool Global = false
 if you make this panel global, it'll ignore
bool HideOnEmptySlot =true
 whether or not the details panel should be hidden when the currently selected slot is empty
string DefaultTitle
 the title to display when none is provided
string DefaultShortDescription
 the short description to display when none is provided
string DefaultDescription
 the description to display when none is provided
string DefaultQuantity
 the quantity to display when none is provided
Sprite DefaultIcon
 the icon to display when none is provided
bool HideOnStart = true
 whether or not to hide the details panel at start
Image Icon
 the icon container object
Text Title
 the title container object
Text ShortDescription
 the short description container object
Text Description
 the description container object
Text Quantity
 the quantity container object

Protected Member Functions

virtual void Start ()
 On Start, we grab and store the canvas group and determine our current Hidden status.
virtual IEnumerator FillDetailFields (InventoryItem item, float initialDelay)
 Fills the various detail fields with the item's metadata.
virtual IEnumerator FillDetailFieldsWithDefaults (float initialDelay)
 Fills the detail fields with default values.
virtual void OnEnable ()
 On Enable, we start listening for MMInventoryEvents.
virtual void OnDisable ()
 On Disable, we stop listening for MMInventoryEvents.

Protected Attributes

float _fadeDelay =0.2f
CanvasGroup _canvasGroup

Properties

virtual bool Hidden [get, protected set]
 whether the details are currently hidden or not

Detailed Description

A class used to display an item's details in GUI.

Member Function Documentation

◆ DisplayDetails()

virtual void MoreMountains.InventoryEngine.InventoryDetails.DisplayDetails ( InventoryItem item)
virtual

Starts the display coroutine or the panel's fade depending on whether or not the current slot is empty.

Parameters
itemItem.

◆ FillDetailFields()

virtual IEnumerator MoreMountains.InventoryEngine.InventoryDetails.FillDetailFields ( InventoryItem item,
float initialDelay )
protectedvirtual

Fills the various detail fields with the item's metadata.

Returns
The detail fields.
Parameters
itemItem.
initialDelayInitial delay.

◆ FillDetailFieldsWithDefaults()

virtual IEnumerator MoreMountains.InventoryEngine.InventoryDetails.FillDetailFieldsWithDefaults ( float initialDelay)
protectedvirtual

Fills the detail fields with default values.

Returns
The detail fields with defaults.
Parameters
initialDelayInitial delay.

◆ OnDisable()

virtual void MoreMountains.InventoryEngine.InventoryDetails.OnDisable ( )
protectedvirtual

On Disable, we stop listening for MMInventoryEvents.

◆ OnEnable()

virtual void MoreMountains.InventoryEngine.InventoryDetails.OnEnable ( )
protectedvirtual

On Enable, we start listening for MMInventoryEvents.

◆ OnMMEvent()

virtual void MoreMountains.InventoryEngine.InventoryDetails.OnMMEvent ( MMInventoryEvent inventoryEvent)
virtual

Catches MMInventoryEvents and displays details if needed.

Parameters
inventoryEventInventory event.

◆ Start()

virtual void MoreMountains.InventoryEngine.InventoryDetails.Start ( )
protectedvirtual

On Start, we grab and store the canvas group and determine our current Hidden status.

Member Data Documentation

◆ _canvasGroup

CanvasGroup MoreMountains.InventoryEngine.InventoryDetails._canvasGroup
protected

◆ _fadeDelay

float MoreMountains.InventoryEngine.InventoryDetails._fadeDelay =0.2f
protected

◆ DefaultDescription

string MoreMountains.InventoryEngine.InventoryDetails.DefaultDescription

the description to display when none is provided

◆ DefaultIcon

Sprite MoreMountains.InventoryEngine.InventoryDetails.DefaultIcon

the icon to display when none is provided

◆ DefaultQuantity

string MoreMountains.InventoryEngine.InventoryDetails.DefaultQuantity

the quantity to display when none is provided

◆ DefaultShortDescription

string MoreMountains.InventoryEngine.InventoryDetails.DefaultShortDescription

the short description to display when none is provided

◆ DefaultTitle

string MoreMountains.InventoryEngine.InventoryDetails.DefaultTitle

the title to display when none is provided

◆ Description

Text MoreMountains.InventoryEngine.InventoryDetails.Description

the description container object

◆ Global

bool MoreMountains.InventoryEngine.InventoryDetails.Global = false

if you make this panel global, it'll ignore

◆ HideOnEmptySlot

bool MoreMountains.InventoryEngine.InventoryDetails.HideOnEmptySlot =true

whether or not the details panel should be hidden when the currently selected slot is empty

◆ HideOnStart

bool MoreMountains.InventoryEngine.InventoryDetails.HideOnStart = true

whether or not to hide the details panel at start

◆ Icon

Image MoreMountains.InventoryEngine.InventoryDetails.Icon

the icon container object

◆ PlayerID

string MoreMountains.InventoryEngine.InventoryDetails.PlayerID = "Player1"

◆ Quantity

Text MoreMountains.InventoryEngine.InventoryDetails.Quantity

the quantity container object

◆ ShortDescription

Text MoreMountains.InventoryEngine.InventoryDetails.ShortDescription

the short description container object

◆ TargetInventoryName

string MoreMountains.InventoryEngine.InventoryDetails.TargetInventoryName

the reference inventory from which we'll display item details

◆ Title

Text MoreMountains.InventoryEngine.InventoryDetails.Title

the title container object

Property Documentation

◆ Hidden

virtual bool MoreMountains.InventoryEngine.InventoryDetails.Hidden
getprotected set

whether the details are currently hidden or not


The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/InventoryEngine/InventoryEngine/Scripts/GUI/InventoryDetails.cs