Class NewTooltipAttribute
Marks a method, property, or field as a 'TooltipPart'. Tooltip parts will be composed to form the tooltip for a type.
Inheritance
Inherited Members
Namespace: Eco.Gameplay.Systems.NewTooltip
Assembly: Eco.Gameplay.dll
Syntax
public class NewTooltipAttribute : NewTooltipAttributeBase
Remarks
See tootlip.md for the full picture.
Constructors
NewTooltipAttribute(CacheAs, Int32, TTCat, TTFlags, Type, Type[])
Declares a tooltip part, along with how it is cached. Tooltip parts must be marked 'dirty' when they're updated, so the clients that are caching them can be informed of the change.
Declaration
public NewTooltipAttribute(CacheAs cacheMode, int priority = 0, TTCat categories, TTFlags flags, Type overrideType = null, params Type[] ignoreType)
Parameters
Type | Name | Description |
---|---|---|
CacheAs | cacheMode | How many cache entries should be created? One per instance, user, type, subytpe, etc |
System.Int32 | priority | What order is the tooltip part displayed to the client among other tooltip parts (lower value means higher priority) |
TTCat | categories | Allows defining categories, so certain types of tooltip parts can be excluded in certain situations (IE, we dont want to show 'controls' tooltip parts when showing items in the ecopedia, becasue its not an item you can control) |
TTFlags | flags | Extra flags to control cache-clearing and other behavior |
System.Type | overrideType | Defining this will set the type that the tooltip part displays on. By setting this, you can make a tooltip part appear on all objects of a given type. The tooltip part function can accept a 'Type' param that will send in the type its being executed on. |
System.Type[] | ignoreType |
Fields
Categories
Declaration
public TTCat Categories
Field Value
Type | Description |
---|---|
TTCat |
Priority
Declaration
public float Priority
Field Value
Type | Description |
---|---|
System.Single |
Methods
CreatePartInstance(MemberInfo, Type)
Declaration
public override TooltipPartBase CreatePartInstance(MemberInfo member, Type rootType)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | |
System.Type | rootType |
Returns
Type | Description |
---|---|
TooltipPartBase |