tModLoader v2024.11
A mod to make and play Terraria mods
FilterProviderInfoElement Class Reference

Inherits IFilterInfoProvider, IProvideSearchFilterString, and IBestiaryInfoElement.

Inherited by SpawnConditionBestiaryInfoElement, and SpawnConditionBestiaryOverlayInfoElement.

Public Member Functions

 FilterProviderInfoElement (string nameLanguageKey, int filterIconFrame)
 
string GetDisplayNameKey ()
 
UIElement GetFilterImage ()
 
string GetSearchString (ref BestiaryUICollectionInfo info)
 
UIElement ProvideUIElement (BestiaryUICollectionInfo info)
 Use to create the UIElement for this bestiary entry. Called when the bestiary entry is clicked in-game. Use BestiaryUICollectionInfo.UnlockState to dynamically populate the UI according to how fully unlocked this particular bestiary entry is. Return null if no UIElement should be provided, which is usually the case for NPC never encountered. More...
 
string GetDisplayNameKey ()
 
UIElement GetFilterImage ()
 
string GetSearchString (ref BestiaryUICollectionInfo info)
 
UIElement ProvideUIElement (BestiaryUICollectionInfo info)
 Use to create the UIElement for this bestiary entry. Called when the bestiary entry is clicked in-game. Use BestiaryUICollectionInfo.UnlockState to dynamically populate the UI according to how fully unlocked this particular bestiary entry is. Return null if no UIElement should be provided, which is usually the case for NPC never encountered. More...
 

Properties

int DisplayTextPriority [get, set]
 
bool HideInPortraitInfo [get, set]
 

Member Function Documentation

◆ GetDisplayNameKey()

string FilterProviderInfoElement.GetDisplayNameKey ( )

Implements IFilterInfoProvider.

◆ GetFilterImage()

UIElement FilterProviderInfoElement.GetFilterImage ( )

Implements IFilterInfoProvider.

◆ GetSearchString()

string FilterProviderInfoElement.GetSearchString ( ref BestiaryUICollectionInfo  info)

◆ ProvideUIElement()

UIElement FilterProviderInfoElement.ProvideUIElement ( BestiaryUICollectionInfo  info)

Use to create the UIElement for this bestiary entry. Called when the bestiary entry is clicked in-game. Use BestiaryUICollectionInfo.UnlockState to dynamically populate the UI according to how fully unlocked this particular bestiary entry is. Return null if no UIElement should be provided, which is usually the case for NPC never encountered.

if (info.UnlockState == BestiaryEntryUnlockState.NotKnownAtAll_0) return null;

// other code creating and returning a UIElement showing info

Implements IBestiaryInfoElement.