|
TModLoader v1.4.4.9
TModLoader source code documentation
|
This class serves as a way to store information about a line that will be drawn of tooltip for an item. You will create and manipulate objects of this class if you use the draw hooks for tooltips in ModItem and GlobalItem. For examples, see ExampleSword. More...
Inheritance diagram for Terraria.ModLoader.DrawableTooltipLine:
Collaboration diagram for Terraria.ModLoader.DrawableTooltipLine:Public Member Functions | |
| DrawableTooltipLine (TooltipLine parent, int index, int x, int y, Color color) | |
| Creates a new DrawableTooltipLine object. | |
| void | Hide () |
Public Attributes | |
| new readonly string | Text |
| The text of this tooltip. | |
| readonly int | Index |
| The index of the tooltip in the array. | |
| new readonly bool | IsModifier |
| Whether or not this tooltip gives prefix information. This will make it so that the tooltip is colored either green or red. | |
| new readonly bool | IsModifierBad |
| If isModifier is true, this determines whether the tooltip is colored green or red. | |
| int | X |
| The X position where the tooltip would be drawn. | |
| int | Y |
| The Y position where the tooltip would be drawn. | |
| new readonly bool | OneDropLogo |
| Whether the tooltip is a One Drop logo or not. If it is, the tooltip text will be empty. | |
| DynamicSpriteFont | Font = FontAssets.MouseText.Value |
| The font this tooltip would be drawn with. | |
| float | Rotation |
| The rotation this tooltip would be drawn in. | |
| Vector2 | Origin = Vector2.Zero |
| The origin of this tooltip. | |
| Vector2 | BaseScale = Vector2.One |
| The baseScale of this tooltip. When drawing the One Drop logo the scale is calculated by (baseScale.X + baseScale.Y) / 2. | |
| float | MaxWidth = -1f |
| float | Spread = 2f |
| readonly string | Mod |
| The name of the mod adding this tooltip line. This will be "Terraria" for all vanilla tooltip lines. | |
| readonly string | Name |
| The name of the tooltip, used to help you identify its function. | |
Properties | |
| int | OriginalX [get, set] |
| The X position where the tooltip would be drawn that is not adjusted by mods. | |
| int | OriginalY [get, set] |
| The Y position where the tooltip would be drawn that is not adjusted by mods. | |
| Color | Color [get, set] |
| The color the tooltip would be drawn in. | |
| new? Color | OverrideColor [get, set] |
| If the tooltip line's color was overridden this will hold that color, it will be null otherwise. | |
| string | FullName [get] |
| => $"{Mod}/{Name}" | |
| bool | Visible = true [get, private set] |
Private Attributes | |
| int | _originalX |
| int | _originalY |
This class serves as a way to store information about a line that will be drawn of tooltip for an item. You will create and manipulate objects of this class if you use the draw hooks for tooltips in ModItem and GlobalItem. For examples, see ExampleSword.
Definition at line 10 of file DrawableTooltipLine.cs.