|
static void | AssignAsSonarText (int sonarTextIndex) |
| Marks the PopupText in Main.popupText at sonarTextIndex as sonar text, assigning sonarText and setting sonar to true . More...
|
|
static void | ClearAll () |
| Sets all PopupTexts in Main.popupText to a new instance and assigns numActive to 0 .
|
|
static void | ClearSonarText () |
| Destroys the PopupText in Main.popupText at the index sonarText if that text has sonar set to true . Note that multiple fishing lures is a common feature of many popular mods, so this method won't clear all PopupText in that situation because only 1 index is tracked. The Projectile.localAI[2] of a bobber projectile is used to store the index of its sonar PopupText. That stored value is offset by +1.
|
|
static int | NewText (AdvancedPopupRequest request, Vector2 position) |
| Creates a new PopupText in Main.popupText at position using the settings from request .
The new PopupText is not bound to a specific Item or NPCID.
All PopupTexts created using this method have context == PopupTextContext.Advanced and freeAdvanced set to true . More...
|
|
static int | NewText (PopupTextContext context, int npcNetID, Vector2 position, bool stay5TimesLonger) |
| Creates a new PopupText in Main.popupText at position bound to a given npcNetID . More...
|
|
static int | NewText (PopupTextContext context, Item newItem, int stack, bool noStack=false, bool longText=false) |
| Creates a new PopupText in Main.popupText at the center of the picked-up newItem .
If a PopupText already exists with the Item.AffixName of newItem , that text will instead be modified unless noStack is true . More...
|
|
static void | ResetText (PopupText text) |
| Resets a PopupText to its default values. More...
|
|
static void | UpdateItemText () |
| Calls Update(int) on all active PopupTexts in Main.popupText and assigns numActive.
|
|
static string | ValueToName (long coinValue) |
| Converts a value in copper coins to a formatted string. More...
|
|
|
bool | active |
| If true , this PopupText is visible in the world.
|
|
float | alpha |
| The opacity of this PopupText in the range [0f, 1f], where 0f is transparent and 1f is opaque.
|
|
int | alphaDir = 1 |
| The direction this PopupText's alpha changes in.
|
|
bool | coinText |
| If true , this PopupText is specifically for coins.
|
|
long | coinValue |
| The value of coins this PopupText represents in the range [0, 999999999].
|
|
Color | color |
| The color of this PopupText's text.
|
|
PopupTextContext | context |
| The context in which this PopupText was created.
|
|
bool | expert |
| If true , this PopupText will draw in the Expert Mode rarity color.
|
|
bool | freeAdvanced |
| If true , this PopupText is not bound to an item or NPC.
|
|
int | lifeTime |
| The time in ticks this PopupText will remain for until it starts to disappear.
|
|
bool | master |
| If true , this PopupText will draw in the Master Mode rarity color.
|
|
string | name |
| The text displayed by this PopupText.
|
|
bool | NoStack |
| If true , this PopupText can't be modified when creating a new item PopupText.
|
|
int | npcNetID |
| The NPC type (NPC.type) this PopupText is bound to, or 0 if not bound to an NPC.
|
|
Vector2 | position |
| The position of this PopupText in world coordinates.
|
|
int | rarity |
| The ItemRarityID this PopupText uses for its main color.
|
|
float | rotation |
| The clockwise rotation of this PopupText in radians.
|
|
float | scale = 1f |
| The scale this PopupText draws at.
|
|
bool | sonar |
| Marks this PopupText as this player's Sonar Potion text.
|
|
long | stack |
| The optional stack size appended to name.
Will only be displayed is stack > 1 .
|
|
Vector2 | velocity |
| The velocity of this PopupText in world coordinates per tick.
|
|
Represents an in-world floating text object.