|
TModLoader v1.4.4.9
TModLoader source code documentation
|
Represents an in-world floating text object.
<VariousTextOptionsSummary>
Summary of options to display text to the user:
• M:Terraria.Main.NewText(System.String,System.Byte,System.Byte,System.Byte) to display a message in chat.
• T:Terraria.CombatText to display floating damage numbers in-game. Used for damage and healing numbers.
• T:Terraria.PopupText to display non-overlapping floating in-game text. Used for reforge and item pickup messages.
</VariousTextOptionsSummary>
More...
Collaboration diagram for Terraria.PopupText:Public Member Functions | |
| void | Update (int whoAmI) |
| Updates this T:Terraria.PopupText. | |
Static Public Member Functions | |
| static void | ClearSonarText () |
Destroys the T:Terraria.PopupText in F:Terraria.Main.popupText at the index F:Terraria.PopupText.sonarText if that text has F:Terraria.PopupText.sonar set to true. | |
| static void | ResetText (PopupText text) |
| Resets a T:Terraria.PopupText to its default values. | |
| static int | NewText (AdvancedPopupRequest request, Vector2 position) |
| Creates a new T:Terraria.PopupText in F:Terraria.Main.popupText at position using the settings from request . The new T:Terraria.PopupText is not bound to a specific T:Terraria.Item or T:Terraria.ID.NPCID. All T:Terraria.PopupTexts created using this method have F:Terraria.PopupText.context == F:Terraria.PopupTextContext.Advanced and F:Terraria.PopupText.freeAdvanced set to true. | |
| static int | NewText (PopupTextContext context, int npcNetID, Vector2 position, bool stay5TimesLonger) |
| Creates a new T:Terraria.PopupText in F:Terraria.Main.popupText at position bound to a given npcNetID . | |
| static int | NewText (PopupTextContext context, Item newItem, int stack, bool noStack=false, bool longText=false) |
| Creates a new T:Terraria.PopupText in F:Terraria.Main.popupText at the center of the picked-up newItem . If a T:Terraria.PopupText already exists with the M:Terraria.Item.AffixName of newItem , that text will instead be modified unless noStack is true. | |
| static void | AssignAsSonarText (int sonarTextIndex) |
Marks the T:Terraria.PopupText in F:Terraria.Main.popupText at sonarTextIndex as sonar text, assigning F:Terraria.PopupText.sonarText and setting F:Terraria.PopupText.sonar to true. | |
| static string | ValueToName (long coinValue) |
| Converts a value in copper coins to a formatted string. | |
| static void | UpdateItemText () |
| Calls M:Terraria.PopupText.Update(System.Int32) on all F:Terraria.PopupText.active T:Terraria.PopupTexts in F:Terraria.Main.popupText and assigns F:Terraria.PopupText.numActive. | |
| static void | ClearAll () |
Sets all T:Terraria.PopupTexts in F:Terraria.Main.popupText to a new instance and assigns F:Terraria.PopupText.numActive to 0. | |
Public Attributes | |
| Vector2 | position |
| The position of this T:Terraria.PopupText in world coordinates. | |
| Vector2 | velocity |
| The velocity of this T:Terraria.PopupText in world coordinates per tick. | |
| float | alpha |
The opacity of this T:Terraria.PopupText in the range [0f, 1f], where 0f is transparent and 1f is opaque. | |
| int | alphaDir = 1 |
| The direction this T:Terraria.PopupText's F:Terraria.PopupText.alpha changes in. | |
| string | name |
| The text displayed by this T:Terraria.PopupText. | |
| long | stack |
| The optional stack size appended to F:Terraria.PopupText.name. Will only be displayed is F:Terraria.PopupText.stack > 1. | |
| float | scale = 1f |
| The scale this T:Terraria.PopupText draws at. | |
| float | rotation |
| The clockwise rotation of this T:Terraria.PopupText in radians. | |
| Color | color |
| The color of this T:Terraria.PopupText's text. | |
| bool | active |
If true, this T:Terraria.PopupText is visible in the world. | |
| int | lifeTime |
| The time in ticks this T:Terraria.PopupText will remain for until it starts to disappear. | |
| bool | NoStack |
If true, this T:Terraria.PopupText can't be modified when creating a new item T:Terraria.PopupText. | |
| bool | coinText |
If true, this T:Terraria.PopupText is specifically for coins. | |
| long | coinValue |
| The value of coins this T:Terraria.PopupText represents in the range [0, 999999999]. | |
| bool | expert |
If true, this T:Terraria.PopupText will draw in the Expert Mode rarity color. | |
| bool | master |
If true, this T:Terraria.PopupText will draw in the Master Mode rarity color. | |
| bool | sonar |
| Marks this T:Terraria.PopupText as this player's Sonar Potion text. | |
| PopupTextContext | context |
| The context in which this T:Terraria.PopupText was created. | |
| int | npcNetID |
The NPC type (F:Terraria.NPC.type) this T:Terraria.PopupText is bound to, or 0 if not bound to an NPC. | |
| bool | freeAdvanced |
If true, this T:Terraria.PopupText is not bound to an item or NPC. | |
| int | rarity |
| The T:Terraria.ID.ItemRarityID this T:Terraria.PopupText uses for its main color. | |
Static Public Attributes | |
| static int | activeTime = 60 |
| The default F:Terraria.PopupText.lifeTime of a T:Terraria.PopupText. | |
| static int | numActive |
| The number of F:Terraria.PopupText.active T:Terraria.PopupTexts in F:Terraria.Main.popupText. Assigned after M:Terraria.PopupText.UpdateItemText runs. | |
| static int | sonarText = -1 |
| The index in F:Terraria.Main.popupText of the last known sonar text. Assign and clear using M:Terraria.PopupText.AssignAsSonarText(System.Int32) and M:Terraria.PopupText.ClearSonarText. | |
Properties | |
| bool | notActuallyAnItem [get] |
If true, this T:Terraria.PopupText is not for an item. | |
| static float | TargetScale [get] |
Private Member Functions | |
| void | AddToCoinValue (long addedValue) |
| void | ValueToName () |
| Vector2 | GetTextHitbox () |
Static Private Member Functions | |
| static int | FindNextItemTextSlot () |
Represents an in-world floating text object.
<VariousTextOptionsSummary>
Summary of options to display text to the user:
• M:Terraria.Main.NewText(System.String,System.Byte,System.Byte,System.Byte) to display a message in chat.
• T:Terraria.CombatText to display floating damage numbers in-game. Used for damage and healing numbers.
• T:Terraria.PopupText to display non-overlapping floating in-game text. Used for reforge and item pickup messages.
</VariousTextOptionsSummary>
Definition at line 18 of file PopupText.cs.