TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ PreDrawResourceDisplay()

virtual bool Terraria.ModLoader.ModResourceOverlay.PreDrawResourceDisplay ( PlayerStatsSnapshot snapshot,
IPlayerResourcesDisplaySet displaySet,
bool drawingLife,
ref Color textColor,
out bool drawText )
inlinevirtual

Allows you to draw before the resources (hearts, stars, bars and/or panels) in a display set are drawn.
If you want to implement your own display set, it is recommended to use T:Terraria.ModLoader.ModResourceDisplaySet instead of this hook.

Parameters
snapshotA snapshot of the stats from Main.LocalPlayer
displaySetThe display set being drawn
drawingLifeWhether the life or mana display is going to be drawn. true if the life display is going to be drawn, false if the mana display is going to be drawn.
textColorThe color to draw the text above the resources with. Only applies to the Classic display set.
drawTextWhether the text above the resources should draw. Only applies to the Classic display set.
Returns
Whether the resources in the display set are drawn

Definition at line 57 of file ModResourceOverlay.cs.

58 {
59 drawText = true;
60 return true;
61 }