Hover Details UGUI
Scripting with the InventoolHoverDetailsUGUI class.
The InventoolHoverDetailsUGUI
class is a mini pop-up window that displays item details.
Fields & Properties
statElementPrefab
The stat element prefab.
StatElementUGUI
protected
content
The main content container.
RectTransform
protected
canvas
The canvas component.
Canvas
protected
animator
The animator component.
Animator
protected
itemBackground
The image used to display the item background.
Image
protected
itemIcon
The image used to display the item icon.
Image
protected
itemNameLabel
The label that displays the item name.
TextMeshProUGUI
protected
itemTypeLabel
The label that displays the item type.
TextMeshProUGUI
protected
descriptionScroll
The scroll rect that contains the description.
ScrollRect
protected
descriptionLabel
The label that displays the description.
TextMeshProUGUI
protected
statsScroll
The scroll rect that displays all stats.
ScrollRect
protected
weightArea
The object that contains weight content.
GameObject
protected
weightLabel
The label that displays the item's weight.
TextMeshProUGUI
protected
currencyIcon
The image that displays the currency icon.
Image
protected
currencyLabel
The label that displays the currency amount.
TextMeshProUGUI
protected
bottomArea
The element that contains the bottom content.
RectTransform
protected
separator
The separator element.
RectTransform
protected
loadedStatElements
A list of loaded stat elements.
List<StatElementUGUI>
protected
appearanceDelay
The length of time the user must hover an item for the details to display.
float
public
autoScrollDelay
The automatic scrolling delay when the scroll rect reaches the beginning or end.
float
protected
descriptionAutoScrollSpeed
The automatic scrolling speed of the description scroll rect.
float
protected
statsAutoScrollSpeed
The automatic scrolling speed of the stats scroll rect.
float
protected
autoScrollDescriptionToEnd
If the description auto scroll is currently scrolling to the end.
bool
protected
autoScrollStatsToEnd
If the stats auto scroll is currently scrolling to the end.
bool
protected
openAction
The open action.
Action
protected
transitionState
The current transition state.
TransitionState
protected
Target
The RectTransform currently being targeted.
RectTransform
public
IsOpen
If the hover details is currently open.
bool
public
Active Instance
You can get the active InventoolHoverDetailsUGUI
instance with InventoolHoverDetailsUGUI.Instance
. Ensure there's an instance of it in your scene before using this field.
Open
Opening the hover details essentially requires a RectTransform
target. By default, Inventool has special UI elements that hold a reference to an item, which is used by the InventoolHoverDetailsUGUI
class to both open at the location of the UI element and also display the item details. So, it's not as easy as just calling an Open
method.
Close
Last updated