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

◆ GetFilterImage()

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

Reimplemented from Terraria.GameContent.Bestiary.ModBestiaryInfoElement.

Definition at line 18 of file ModSourceBestiaryInfoElement.cs.

19 {
20 //IL_008a: Unknown result type (might be due to invalid IL or missing references)
21 //IL_0029: Unknown result type (might be due to invalid IL or missing references)
22 //IL_0033: Unknown result type (might be due to invalid IL or missing references)
24 if (_mod.HasAsset("icon_small"))
25 {
26 asset = _mod.Assets.Request<Texture2D>("icon_small");
27 if (asset.Size() == new Vector2(30f))
28 {
29 return new UIImage(asset)
30 {
31 HAlign = 0.5f,
32 VAlign = 0.5f
33 };
34 }
35 _mod.Logger.Info((object)"icon_small needs to be 30x30 pixels.");
36 }
37 asset = Main.Assets.Request<Texture2D>("Images/UI/Bestiary/Icon_Tags_Shadow");
38 return new UIImageFramed(asset, asset.Frame(16, 5, 0, 4))
39 {
40 HAlign = 0.5f,
41 VAlign = 0.5f
42 };
43 }
ILog Logger
A logger with this mod's name for easy logging.
Definition Mod.cs:61
AssetRepository Assets
Definition Mod.cs:114
bool HasAsset(string assetName)
Definition Mod.cs:335

References Terraria.GameContent.Bestiary.ModBestiaryInfoElement._mod, Terraria.ModLoader.Mod.Assets, Terraria.Main.Assets, Terraria.ModLoader.Mod.HasAsset(), and Terraria.ModLoader.Mod.Logger.

+ Here is the call graph for this function: