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

◆ GetFilterImage()

override UIElement Terraria.GameContent.Bestiary.ModBiomeBestiaryInfoElement.GetFilterImage ( )
inlinevirtual

Reimplemented from Terraria.GameContent.Bestiary.ModBestiaryInfoElement.

Definition at line 21 of file ModBiomeBestiaryInfoElement.cs.

22 {
23 //IL_0085: Unknown result type (might be due to invalid IL or missing references)
24 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
25 //IL_0023: Unknown result type (might be due to invalid IL or missing references)
26 if (_iconPath != null && ModContent.RequestIfExists(_iconPath, out Asset<Texture2D> asset, AssetRequestMode.ImmediateLoad))
27 {
28 if (asset.Size() == new Vector2(30f))
29 {
30 return new UIImage(asset)
31 {
32 HAlign = 0.5f,
33 VAlign = 0.5f
34 };
35 }
36 _mod.Logger.Info((object)(_iconPath + " needs to be 30x30 pixels."));
37 }
38 asset = Main.Assets.Request<Texture2D>("Images/UI/Bestiary/Icon_Tags_Shadow");
39 return new UIImageFramed(asset, asset.Frame(16, 5, 0, 4))
40 {
41 HAlign = 0.5f,
42 VAlign = 0.5f
43 };
44 }
Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loa...
Definition ModContent.cs:38
ILog Logger
A logger with this mod's name for easy logging.
Definition Mod.cs:61

References Terraria.GameContent.Bestiary.ModBestiaryInfoElement._iconPath, Terraria.GameContent.Bestiary.ModBestiaryInfoElement._mod, Terraria.Main.Assets, and Terraria.ModLoader.Mod.Logger.