tModLoader v2024.09
A mod to make and play Terraria mods
|
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...
Inherits TooltipLine.
Public Member Functions | |
DrawableTooltipLine (TooltipLine parent, int index, int x, int y, Color color) | |
Creates a new DrawableTooltipLine object More... | |
Public Member Functions inherited from TooltipLine | |
TooltipLine (Mod mod, string name, string text) | |
Creates a tooltip line object with the given mod, identifier name, and text. More... | |
void | Hide () |
Public Attributes | |
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 | |
DynamicSpriteFont | Font = FontAssets.MouseText.Value |
The font this tooltip would be drawn with | |
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. | |
float | MaxWidth = -1 |
new readonly bool | OneDropLogo |
Whether the tooltip is a One Drop logo or not. If it is, the tooltip text will be empty. | |
Vector2 | Origin = Vector2.Zero |
The origin of this tooltip | |
float | Rotation |
The rotation this tooltip would be drawn in | |
float | Spread = 2 |
new readonly string | Text |
The text of this tooltip. | |
int | X |
The X position where the tooltip would be drawn. | |
int | Y |
The Y position where the tooltip would be drawn. | |
Public Attributes inherited from TooltipLine | |
bool | IsModifier |
Whether or not this tooltip gives prefix information. This will make it so that the tooltip is colored either green or red. | |
bool | IsModifierBad |
If isModifier is true, this determines whether the tooltip is colored green or red. | |
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. | |
Color? | OverrideColor |
This completely overrides the color the tooltip is drawn in. If it is set to null (the default value) then the tooltip's color will not be overridden. | |
string | Text |
The actual text that this tooltip displays. | |
Properties | |
Color | Color [get, set] |
The color the tooltip would be drawn in | |
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. | |
new? Color | OverrideColor [get, set] |
If the tooltip line's color was overridden this will hold that color, it will be null otherwise | |
Properties inherited from TooltipLine | |
string | FullName [get] |
=> $"{Mod}/{Name}" | |
bool | Visible = true [get] |
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
DrawableTooltipLine.DrawableTooltipLine | ( | TooltipLine | parent, |
int | index, | ||
int | x, | ||
int | y, | ||
Color | color | ||
) |
Creates a new DrawableTooltipLine object
parent | The TooltipLine to make this DrawableTooltipLine from |
index | The index of the line in the array |
x | The X position where the tooltip would be drawn. |
y | The Y position where the tooltip would be drawn. |
color | The color the tooltip would be drawn in |