Show / Hide Table of Contents

Class TooltipPartBase

Inheritance
System.Object
TooltipPartBase
TooltipChildrenPart
TooltipPart
Implements
IController
IViewController
IHasUniversalID
Namespace: Eco.Gameplay.Systems.NewTooltip
Assembly: Eco.Gameplay.dll
Syntax
public abstract class TooltipPartBase : Object, IController, IViewController, IHasUniversalID

Constructors

TooltipPartBase(MemberInfo, NewTooltipAttributeBase, Type)

Declaration
protected TooltipPartBase(MemberInfo member, NewTooltipAttributeBase attr, Type rootType)
Parameters
Type Name Description
System.Reflection.MemberInfo member
NewTooltipAttributeBase attr
System.Type rootType

Properties

Attribute

The attribute from which this part was created.

Declaration
public NewTooltipAttributeBase Attribute { get; protected set; }
Property Value
Type Description
NewTooltipAttributeBase

BaseType

Declaration
public Type BaseType { get; }
Property Value
Type Description
System.Type

CacheMode

Declaration
public CacheAs CacheMode { get; }
Property Value
Type Description
CacheAs

ControllerID

Declaration
public ref int ControllerID { get; }
Property Value
Type Description
System.Int32

IsImage

Declaration
public abstract bool IsImage { get; }
Property Value
Type Description
System.Boolean

IsTitle

Declaration
public abstract bool IsTitle { get; }
Property Value
Type Description
System.Boolean

Name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

RequiresController

Declaration
public bool RequiresController { get; }
Property Value
Type Description
System.Boolean

RequiresOrigin

Declaration
public bool RequiresOrigin { get; }
Property Value
Type Description
System.Boolean

RequiresUser

Declaration
public bool RequiresUser { get; }
Property Value
Type Description
System.Boolean

RequiresView

Declaration
public bool RequiresView { get; }
Property Value
Type Description
System.Boolean

Type

Declaration
public Type Type { get; }
Property Value
Type Description
System.Type

Methods

ClearCache()

Clear the cache of all tooltip parts and children parts.

Declaration
public static void ClearCache()

ClearCache(Int32)

Declaration
public abstract void ClearCache(int id)
Parameters
Type Name Description
System.Int32 id

DebugName()

Declaration
public string DebugName()
Returns
Type Description
System.String

DebugName(String)

Declaration
public string DebugName(string specificUser)
Parameters
Type Name Description
System.String specificUser
Returns
Type Description
System.String

GenerateDebugText(IController, TooltipOrigin, User)

Generates text that represnets contents of this part for given context.

Declaration
public abstract LocString GenerateDebugText(IController controller, TooltipOrigin origin, User user)
Parameters
Type Name Description
IController controller
TooltipOrigin origin
User user
Returns
Type Description
LocString
Remarks

Generated string can be used to compare contents of parts and spot differences.

GetCacheKey(IController)

Declaration
protected int GetCacheKey(IController controller)
Parameters
Type Name Description
IController controller
Returns
Type Description
System.Int32

GetInternalCache()

Declaration
public abstract List<KeyValuePair<(int, TooltipOrigin), LocString>> GetInternalCache()
Returns
Type Description
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.ValueTuple<System.Int32, TooltipOrigin>, LocString>>

GetMemberDelegate(FieldInfo)

Declaration
protected TooltipPartBase.GetValueFromMember GetMemberDelegate(FieldInfo field)
Parameters
Type Name Description
System.Reflection.FieldInfo field
Returns
Type Description
TooltipPartBase.GetValueFromMember

GetMemberDelegate(MethodInfo, Type[])

Declaration
protected TooltipPartBase.GetValueFromMember GetMemberDelegate(MethodInfo method, Type[] paramTypes)
Parameters
Type Name Description
System.Reflection.MethodInfo method
System.Type[] paramTypes
Returns
Type Description
TooltipPartBase.GetValueFromMember

GetMemberDelegate(PropertyInfo)

Declaration
protected TooltipPartBase.GetValueFromMember GetMemberDelegate(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property
Returns
Type Description
TooltipPartBase.GetValueFromMember

MakeRef(IController, Int32)

Create a reference to this part, omitting the controller and user ID if we dont care about them.

Declaration
public TooltipPartRef MakeRef(IController instance, int userId)
Parameters
Type Name Description
IController instance
System.Int32 userId
Returns
Type Description
TooltipPartRef

SetGenerator(TooltipPartBase.GetValueFromMember)

Method that receives a delegate that can call the member marked with the attribute and return object returned by that member. Class overriding this should implement that method to internaly set up it's own generator delegate.

Declaration
protected abstract void SetGenerator(TooltipPartBase.GetValueFromMember generator)
Parameters
Type Name Description
TooltipPartBase.GetValueFromMember generator

Delegate that can call member marked with the attribute and return object returned by that member.

Remarks

This method is called from the base constructor, so it can't rely on any data set in derived class's constructor.

Implements

IController
IViewController
IHasUniversalID

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾