tModLoader v2022.09
A mod to make and play Terraria mods
Terraria.GameContent.Creative.CreativeUI Class Reference

Public Types

enum  ItemSacrificeResult { CannotSacrifice , SacrificedButNotDone , SacrificedAndDone }
 

Public Member Functions

void CloseMenu ()
 
void Draw (SpriteBatch spriteBatch)
 
Item GetItemByIndex (int itemSlotContext)
 
bool GetSacrificeNumbers (out int itemIdChecked, out int amountWeHave, out int amountNeededTotal)
 
void Initialize ()
 
bool IsShowingResearchMenu ()
 
UIElement ProvideItemSlotElement (int itemSlotContext)
 
void Reset ()
 
ItemSacrificeResult SacrificeItem (out int amountWeSacrificed)
 
void SetItembyIndex (Item item, int itemSlotContext)
 
bool ShouldDrawSacrificeArea ()
 
void SwapItem (ref Item item)
 
void ToggleMenu ()
 
void Update (GameTime gameTime)
 

Static Public Member Functions

static int GetSacrificeCount (int type, out bool fullyResearched)
 Method that allows you to easily get how many items of a type you have researched so far More...
 
static ? int GetSacrificesRemaining (int type)
 Method that allows you to easily get how many items of a type you need to fully research that item More...
 
static ItemSacrificeResult ResearchItem (int type)
 
static ItemSacrificeResult SacrificeItem (Item toSacrifice, out int amountWeSacrificed)
 
static ItemSacrificeResult SacrificeItem (ref Item item, out int amountWeSacrificed, bool returnRemainderToPlayer=false)
 

Public Attributes

bool GamepadMoveToSearchButtonHack
 
int GamepadPointIdForInfiniteItemSearchHack = -1
 

Static Public Attributes

const int ItemSlotIndexes_Count = 1
 
const int ItemSlotIndexes_SacrificeItem = 0
 

Properties

bool Blocked [get]
 
bool Enabled [get]
 

Member Function Documentation

◆ GetSacrificeCount()

static int Terraria.GameContent.Creative.CreativeUI.GetSacrificeCount ( int  type,
out bool  fullyResearched 
)
static

Method that allows you to easily get how many items of a type you have researched so far

Parameters
typeThe item type to check.
fullyResearchedTrue if it is fully researched.
Returns

◆ GetSacrificesRemaining()

static ? int Terraria.GameContent.Creative.CreativeUI.GetSacrificesRemaining ( int  type)
static

Method that allows you to easily get how many items of a type you need to fully research that item

Parameters
typeThe item type to check.
Returns
The number of sacrifices remaining , or null if the item can never be unlocked.