tModLoader v2023.10
A mod to make and play Terraria mods
BuffDrawParams Struct Reference

Holds data required for buff drawing. More...

Public Member Functions

 BuffDrawParams (Texture2D texture, Vector2 position, Vector2 textPosition, Rectangle sourceRectangle, Rectangle mouseRectangle, Color drawColor)
void Deconstruct (out Texture2D texture, out Vector2 position, out Vector2 textPosition, out Rectangle sourceRectangle, out Rectangle mouseRectangle, out Color drawColor)

Public Attributes

Color DrawColor
 Color used to draw the buff. Use Main.buffAlpha[buffIndex] accordingly if you change it.
Rectangle MouseRectangle
 Defaults to the size of the autoloaded buffs' sprite, it handles mouseovering and clicking on the buff icon. If you offset the position, or have a non-standard size, change it accordingly.
Vector2 Position
 Top-left position of the buff on the screen.
Rectangle SourceRectangle
 The frame displayed from the texture. Defaults to the entire texture size.
Vector2 TextPosition
 Top left position of the text below the buff (remaining time).
Texture2D Texture
 The texture used for drawing the buff.

Detailed Description

Holds data required for buff drawing.