tModLoader v0.11.8.9
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...
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 Terraria.ModLoader.TooltipLine | |
TooltipLine (Mod mod, string name, string text) | |
Creates a tooltip line object with the given mod, identifier name, and text. More... | |
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 More... | |
DynamicSpriteFont | font = Main.fontMouseText |
The font this tooltip would be drawn with More... | |
readonly int | index |
The index of the tooltip in the array More... | |
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. More... | |
new readonly bool | isModifierBad |
If isModifier is true, this determines whether the tooltip is colored green or red. More... | |
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. More... | |
Vector2 | origin = Vector2.Zero |
The origin of this tooltip More... | |
float | rotation = 0f |
The rotation this tooltip would be drawn in More... | |
float | spread = 2 |
new readonly string | text |
The text of this tooltip. More... | |
int | X |
The X position where the tooltip would be drawn. More... | |
int | Y |
The Y position where the tooltip would be drawn. More... | |
Public Attributes inherited from Terraria.ModLoader.TooltipLine | |
bool | isModifier = false |
Whether or not this tooltip gives prefix information. This will make it so that the tooltip is colored either green or red. More... | |
bool | isModifierBad = false |
If isModifier is true, this determines whether the tooltip is colored green or red. More... | |
readonly string | mod |
The name of the mod adding this tooltip line. This will be "Terraria" for all vanilla tooltip lines. More... | |
readonly string | Name |
The name of the tooltip, used to help you identify its function. More... | |
Color? | overrideColor = null |
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. More... | |
string | text |
The actual text that this tooltip displays. More... | |
Properties | |
Color | color [get, set] |
The color the tooltip would be drawn in More... | |
int | OriginalX [get, set] |
The X position where the tooltip would be drawn that is not adjusted by mods. More... | |
int | OriginalY [get, set] |
The Y position where the tooltip would be drawn that is not adjusted by mods. More... | |
new? Color | overrideColor [get, set] |
If the tooltip line's color was overridden this will hold that color, it will be null otherwise More... | |
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 13 of file DrawableTooltipLine.cs.
Terraria.ModLoader.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 |
Definition at line 97 of file DrawableTooltipLine.cs.
References Terraria.ModLoader.DrawableTooltipLine.color, Terraria.ModLoader.DrawableTooltipLine.index, Terraria.ModLoader.DrawableTooltipLine.isModifier, Terraria.ModLoader.TooltipLine.isModifier, Terraria.ModLoader.DrawableTooltipLine.isModifierBad, Terraria.ModLoader.TooltipLine.isModifierBad, Terraria.ModLoader.DrawableTooltipLine.oneDropLogo, Terraria.ModLoader.DrawableTooltipLine.OriginalX, Terraria.ModLoader.DrawableTooltipLine.OriginalY, Terraria.ModLoader.DrawableTooltipLine.overrideColor, Terraria.ModLoader.TooltipLine.overrideColor, Terraria.ModLoader.DrawableTooltipLine.text, and Terraria.ModLoader.TooltipLine.text.
|
private |
Definition at line 32 of file DrawableTooltipLine.cs.
|
private |
Definition at line 41 of file DrawableTooltipLine.cs.
Vector2 Terraria.ModLoader.DrawableTooltipLine.baseScale = Vector2.One |
The baseScale of this tooltip. When drawing the One Drop logo the scale is calculated by (baseScale.X + baseScale.Y) / 2
Definition at line 84 of file DrawableTooltipLine.cs.
DynamicSpriteFont Terraria.ModLoader.DrawableTooltipLine.font = Main.fontMouseText |
The font this tooltip would be drawn with
Definition at line 72 of file DrawableTooltipLine.cs.
readonly int Terraria.ModLoader.DrawableTooltipLine.index |
The index of the tooltip in the array
Definition at line 22 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
new readonly bool Terraria.ModLoader.DrawableTooltipLine.isModifier |
Whether or not this tooltip gives prefix information. This will make it so that the tooltip is colored either green or red.
Definition at line 26 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
new readonly bool Terraria.ModLoader.DrawableTooltipLine.isModifierBad |
If isModifier is true, this determines whether the tooltip is colored green or red.
Definition at line 30 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
float Terraria.ModLoader.DrawableTooltipLine.maxWidth = -1 |
Definition at line 86 of file DrawableTooltipLine.cs.
new readonly bool Terraria.ModLoader.DrawableTooltipLine.oneDropLogo |
Whether the tooltip is a One Drop logo or not. If it is, the tooltip text will be empty.
Definition at line 68 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
Vector2 Terraria.ModLoader.DrawableTooltipLine.origin = Vector2.Zero |
The origin of this tooltip
Definition at line 80 of file DrawableTooltipLine.cs.
float Terraria.ModLoader.DrawableTooltipLine.rotation = 0f |
The rotation this tooltip would be drawn in
Definition at line 76 of file DrawableTooltipLine.cs.
float Terraria.ModLoader.DrawableTooltipLine.spread = 2 |
Definition at line 87 of file DrawableTooltipLine.cs.
new readonly string Terraria.ModLoader.DrawableTooltipLine.text |
The text of this tooltip.
Definition at line 18 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
int Terraria.ModLoader.DrawableTooltipLine.X |
The X position where the tooltip would be drawn.
Definition at line 52 of file DrawableTooltipLine.cs.
int Terraria.ModLoader.DrawableTooltipLine.Y |
The Y position where the tooltip would be drawn.
Definition at line 56 of file DrawableTooltipLine.cs.
|
getset |
The color the tooltip would be drawn in
Definition at line 60 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
|
getset |
The X position where the tooltip would be drawn that is not adjusted by mods.
Definition at line 36 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
|
getset |
The Y position where the tooltip would be drawn that is not adjusted by mods.
Definition at line 45 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().
|
getset |
If the tooltip line's color was overridden this will hold that color, it will be null otherwise
Definition at line 64 of file DrawableTooltipLine.cs.
Referenced by Terraria.ModLoader.DrawableTooltipLine.DrawableTooltipLine().