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

◆ DrawSavings()

static void Terraria.GameContent.UI.CustomCurrencyManager.DrawSavings ( SpriteBatch sb,
int currencyIndex,
float shopx,
float shopy,
bool horizontal = false )
inlinestatic

Definition at line 29 of file CustomCurrencyManager.cs.

30 {
31 //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
32 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
33 //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
34 //IL_0108: Unknown result type (might be due to invalid IL or missing references)
35 //IL_010d: Unknown result type (might be due to invalid IL or missing references)
36 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
37 //IL_013d: Unknown result type (might be due to invalid IL or missing references)
38 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
39 //IL_0144: Unknown result type (might be due to invalid IL or missing references)
40 //IL_014e: Unknown result type (might be due to invalid IL or missing references)
41 //IL_0153: Unknown result type (might be due to invalid IL or missing references)
42 //IL_0162: Unknown result type (might be due to invalid IL or missing references)
43 //IL_0183: Unknown result type (might be due to invalid IL or missing references)
44 //IL_0188: Unknown result type (might be due to invalid IL or missing references)
45 //IL_018a: Unknown result type (might be due to invalid IL or missing references)
46 //IL_0194: Unknown result type (might be due to invalid IL or missing references)
47 //IL_0199: Unknown result type (might be due to invalid IL or missing references)
48 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)
49 //IL_0217: Unknown result type (might be due to invalid IL or missing references)
50 //IL_0228: Unknown result type (might be due to invalid IL or missing references)
51 //IL_022d: Unknown result type (might be due to invalid IL or missing references)
52 //IL_0232: Unknown result type (might be due to invalid IL or missing references)
53 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)
54 //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
55 //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
56 //IL_01d9: Unknown result type (might be due to invalid IL or missing references)
57 //IL_01de: Unknown result type (might be due to invalid IL or missing references)
58 //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
59 CustomCurrencySystem customCurrencySystem = _currencies[currencyIndex];
60 Player player = Main.player[Main.myPlayer];
61 bool overFlowing;
62 long num = customCurrencySystem.CountCurrency(out overFlowing, player.bank.item);
63 long num2 = customCurrencySystem.CountCurrency(out overFlowing, player.bank2.item);
64 long num3 = customCurrencySystem.CountCurrency(out overFlowing, player.bank3.item);
65 long num4 = customCurrencySystem.CountCurrency(out overFlowing, player.bank4.item);
66 long num5 = customCurrencySystem.CombineStacks(out overFlowing, num, num2, num3, num4);
67 if (num5 > 0)
68 {
69 Main.GetItemDrawFrame(4076, out var itemTexture, out var itemFrame);
70 Main.GetItemDrawFrame(3813, out var itemTexture2, out var itemFrame2);
71 Main.GetItemDrawFrame(346, out var itemTexture3, out var itemFrame3);
72 Main.GetItemDrawFrame(87, out var itemTexture4, out var itemFrame4);
73 if (num4 > 0)
74 {
75 sb.Draw(itemTexture, Utils.CenteredRectangle(new Vector2(shopx + 96f, shopy + 50f), itemFrame.Size() * 0.65f), (Rectangle?)null, Color.White);
76 }
77 if (num3 > 0)
78 {
79 sb.Draw(itemTexture2, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), itemFrame2.Size() * 0.65f), (Rectangle?)null, Color.White);
80 }
81 if (num2 > 0)
82 {
83 sb.Draw(itemTexture3, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), itemFrame3.Size() * 0.65f), (Rectangle?)null, Color.White);
84 }
85 if (num > 0)
86 {
87 sb.Draw(itemTexture4, Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), itemFrame4.Size() * 0.65f), (Rectangle?)null, Color.White);
88 }
89 Utils.DrawBorderStringFourWay(sb, FontAssets.MouseText.Value, Lang.inter[66].Value, shopx, shopy + 40f, Color.White * ((float)(int)Main.mouseTextColor / 255f), Color.Black, Vector2.Zero);
90 customCurrencySystem.DrawSavingsMoney(sb, Lang.inter[66].Value, shopx, shopy, num5, horizontal);
91 }
92 }
static Dictionary< int, CustomCurrencySystem > _currencies

References Terraria.GameContent.UI.CustomCurrencyManager._currencies, Terraria.Player.bank, Terraria.Player.bank2, Terraria.Player.bank3, Terraria.Player.bank4, Terraria.Utils.CenteredRectangle(), Terraria.Utils.DrawBorderStringFourWay(), Terraria.Main.GetItemDrawFrame(), Terraria.Lang.inter, Terraria.Chest.item, Terraria.GameContent.FontAssets.MouseText, Terraria.Main.mouseTextColor, Terraria.Main.myPlayer, and Terraria.Main.player.

Referenced by Terraria.UI.ItemSlot.DrawSavings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: