tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.DataStructures.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. More...
 
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. More...
 
Vector2 Position
 Top-left position of the buff on the screen. More...
 
Rectangle SourceRectangle
 The frame displayed from the texture. Defaults to the entire texture size. More...
 
Vector2 TextPosition
 Top left position of the text below the buff (remaining time). More...
 
Texture2D Texture
 The texture used for drawing the buff. More...
 

Detailed Description

Holds data required for buff drawing.

Member Data Documentation

◆ DrawColor

Color Terraria.DataStructures.BuffDrawParams.DrawColor

Color used to draw the buff. Use Main.buffAlpha[buffIndex] accordingly if you change it.

◆ MouseRectangle

Rectangle Terraria.DataStructures.BuffDrawParams.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.

◆ Position

Vector2 Terraria.DataStructures.BuffDrawParams.Position

Top-left position of the buff on the screen.

◆ SourceRectangle

Rectangle Terraria.DataStructures.BuffDrawParams.SourceRectangle

The frame displayed from the texture. Defaults to the entire texture size.

◆ TextPosition

Vector2 Terraria.DataStructures.BuffDrawParams.TextPosition

Top left position of the text below the buff (remaining time).

◆ Texture

Texture2D Terraria.DataStructures.BuffDrawParams.Texture

The texture used for drawing the buff.