tModLoader v2024.02
A mod to make and play Terraria mods
BossBarDrawParams Struct Reference

Holds data required for boss bar drawing. More...

Public Member Functions

 BossBarDrawParams (Texture2D barTexture, Vector2 barCenter, Texture2D iconTexture, Rectangle iconFrame, Color iconColor, float life, float lifeMax, float shield=0f, float shieldMax=0f, float iconScale=1f, bool showText=true, Vector2 textOffset=default)
 
void Deconstruct (out Texture2D barTexture, out Vector2 barCenter, out Texture2D iconTexture, out Rectangle iconFrame, out Color iconColor, out float life, out float lifeMax, out float shield, out float shieldMax, out float iconScale, out bool showText, out Vector2 textOffset)
 

Public Attributes

Vector2 BarCenter
 The screen position of the center of the bar.
 
Texture2D BarTexture
 The texture with fixed dimensions (516x348) containing all the necessary parts.
 
Color IconColor
 The tint of the icon.
 
Rectangle IconFrame
 The icon textures frame.
 
float IconScale
 The scale the icon is drawn with. Defaults to 1f, modify if icon is bigger or smaller than 26x28.
 
Texture2D IconTexture
 The displayed icon texture.
 
float Life
 The current life of the boss
 
float LifeMax
 The max life of the boss (the amount it spawned with)
 
float Shield
 The current shield of the boss
 
float ShieldMax
 The max shield of the boss (may be 0 if the boss has no shield)
 
bool ShowText
 If the current life (or shield) of the boss should be written on the bar.
 
Vector2 TextOffset
 The text offset from the center (BarCenter)
 

Detailed Description

Holds data required for boss bar drawing.