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

◆ DrawInventory()

void Terraria.Main.DrawInventory ( )
inlineprotected

Definition at line 37731 of file Main.cs.

37732 {
37733 Recipe.GetThroughDelayedFindRecipes();
37734 if (ShouldPVPDraw)
37735 {
37736 DrawPVPIcons();
37737 }
37738 int num = 0;
37739 int num2 = 0;
37740 int num3 = screenWidth;
37741 int num4 = 0;
37742 int num5 = screenWidth;
37743 int num6 = 0;
37744 Vector2 vector = new Vector2(num, num2);
37745 new Vector2(num3, num4);
37746 new Vector2(num5, num6);
37747 DrawBestiaryIcon(num, num2);
37749 DrawTrashItemSlot(num, num2);
37751 inventoryScale = 0.85f;
37752 if (mouseX > 20 && mouseX < (int)(20f + 560f * inventoryScale) && mouseY > 20 && mouseY < (int)(20f + 280f * inventoryScale) && !PlayerInput.IgnoreMouseInterface)
37753 {
37754 player[myPlayer].mouseInterface = true;
37755 }
37756 for (int i = 0; i < 10; i++)
37757 {
37758 for (int j = 0; j < 5; j++)
37759 {
37760 int num7 = (int)(20f + (float)(i * 56) * inventoryScale) + num;
37761 int num8 = (int)(20f + (float)(j * 56) * inventoryScale) + num2;
37762 int num9 = i + j * 10;
37763 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
37764 if (mouseX >= num7 && (float)mouseX <= (float)num7 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num8 && (float)mouseY <= (float)num8 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
37765 {
37766 player[myPlayer].mouseInterface = true;
37767 ItemSlot.OverrideHover(player[myPlayer].inventory, 0, num9);
37768 if (player[myPlayer].inventoryChestStack[num9] && (player[myPlayer].inventory[num9].type == 0 || player[myPlayer].inventory[num9].stack == 0))
37769 {
37770 player[myPlayer].inventoryChestStack[num9] = false;
37771 }
37772 if (!player[myPlayer].inventoryChestStack[num9])
37773 {
37774 ItemSlot.LeftClick(player[myPlayer].inventory, 0, num9);
37775 ItemSlot.RightClick(player[myPlayer].inventory, 0, num9);
37777 {
37778 Recipe.FindRecipes();
37779 }
37780 }
37781 ItemSlot.MouseHover(player[myPlayer].inventory, 0, num9);
37782 }
37783 ItemSlot.Draw(spriteBatch, player[myPlayer].inventory, 0, num9, new Vector2(num7, num8));
37784 }
37785 }
37787 bool pushSideToolsUp = totalDrawnIcons >= 10;
37789 {
37791 }
37792 ItemSlot.DrawRadialDpad(spriteBatch, new Vector2(20f) + new Vector2(56f * inventoryScale * 10f, 56f * inventoryScale * 5f) + new Vector2(26f, 70f) + vector);
37794 {
37795 int num10 = (int)(20f + 560f * inventoryScale) + num;
37796 int num11 = (int)(20f + 0f * inventoryScale) + num2;
37798 }
37799 if (mapEnabled)
37800 {
37801 bool flag = false;
37802 int num12 = num3 - 440;
37803 int num13 = 40 + num4;
37804 if (screenWidth < 940)
37805 {
37806 flag = true;
37807 }
37808 if (flag)
37809 {
37810 num12 = num5 - 40;
37811 num13 = num6 - 200;
37812 }
37813 int num14 = 0;
37814 for (int k = 0; k < 4; k++)
37815 {
37816 int num15 = 255;
37817 int num16 = num12 + k * 32 - num14;
37818 int num17 = num13;
37819 if (flag)
37820 {
37821 num16 = num12;
37822 num17 = num13 + k * 32 - num14;
37823 }
37824 int num18 = k;
37825 num15 = 120;
37826 if (k > 0 && mapStyle == k - 1)
37827 {
37828 num15 = 200;
37829 }
37831 {
37832 num15 = 255;
37833 num18 += 4;
37834 player[myPlayer].mouseInterface = true;
37836 {
37837 if (k == 0)
37838 {
37839 playerInventory = false;
37840 player[myPlayer].SetTalkNPC(-1);
37843 mapFullscreenScale = 2.5f;
37844 mapFullscreen = true;
37845 resetMapFull = true;
37846 }
37847 if (k == 1)
37848 {
37849 mapStyle = 0;
37851 }
37852 if (k == 2)
37853 {
37854 mapStyle = 1;
37856 }
37857 if (k == 3)
37858 {
37859 mapStyle = 2;
37861 }
37862 }
37863 }
37865 }
37866 }
37867 if (armorHide)
37868 {
37869 armorAlpha -= 0.1f;
37870 if (armorAlpha < 0f)
37871 {
37872 armorAlpha = 0f;
37873 }
37874 }
37875 else
37876 {
37877 armorAlpha += 0.025f;
37878 if (armorAlpha > 1f)
37879 {
37880 armorAlpha = 1f;
37881 }
37882 }
37883 new Microsoft.Xna.Framework.Color((byte)((float)(int)mouseTextColor * armorAlpha), (byte)((float)(int)mouseTextColor * armorAlpha), (byte)((float)(int)mouseTextColor * armorAlpha), (byte)((float)(int)mouseTextColor * armorAlpha));
37884 armorHide = false;
37885 int num19 = 8 + player[myPlayer].GetAmountOfExtraAccessorySlotsToShow();
37886 int num20 = 174 + mH;
37887 int num21 = 950;
37890 {
37891 num20 -= (int)(56f * inventoryScale * (float)(num19 - 9));
37893 }
37894 int num22 = DrawPageIcons(num20 - 32);
37895 if (num22 > -1)
37896 {
37897 HoverItem = new Item();
37898 switch (num22)
37899 {
37900 case 1:
37901 hoverItemName = Lang.inter[80].Value;
37902 break;
37903 case 2:
37904 hoverItemName = Lang.inter[79].Value;
37905 break;
37906 case 3:
37907 hoverItemName = (CaptureModeDisabled ? Lang.inter[115].Value : Lang.inter[81].Value);
37908 break;
37909 }
37910 }
37911 if (EquipPage == 2)
37912 {
37915 Item[] inv = player[myPlayer].miscEquips;
37916 int num23 = screenWidth - 92;
37917 int num24 = mH + 174;
37918 for (int l = 0; l < 2; l++)
37919 {
37920 switch (l)
37921 {
37922 case 0:
37923 inv = player[myPlayer].miscEquips;
37924 break;
37925 case 1:
37926 inv = player[myPlayer].miscDyes;
37927 break;
37928 }
37929 r.X = num23 + l * -47;
37930 for (int m = 0; m < 5; m++)
37931 {
37932 int context = 0;
37933 int num25 = -1;
37934 bool flag2 = false;
37935 switch (m)
37936 {
37937 case 0:
37938 context = 19;
37939 num25 = 0;
37940 break;
37941 case 1:
37942 context = 20;
37943 num25 = 1;
37944 break;
37945 case 2:
37946 context = 18;
37947 flag2 = player[myPlayer].unlockedSuperCart;
37948 break;
37949 case 3:
37950 context = 17;
37951 break;
37952 case 4:
37953 context = 16;
37954 break;
37955 }
37956 if (l == 1)
37957 {
37958 context = 33;
37959 num25 = -1;
37960 flag2 = false;
37961 }
37962 r.Y = num24 + m * 47;
37963 bool flag3 = false;
37965 Microsoft.Xna.Framework.Rectangle r2 = new Microsoft.Xna.Framework.Rectangle(r.Left + 34, r.Top - 2, value2.Width, value2.Height);
37966 int num26 = 0;
37967 if (num25 != -1)
37968 {
37969 if (player[myPlayer].hideMisc[num25])
37970 {
37972 }
37974 {
37975 player[myPlayer].mouseInterface = true;
37976 flag3 = true;
37978 {
37979 if (num25 == 0)
37980 {
37981 player[myPlayer].TogglePet();
37982 }
37983 if (num25 == 1)
37984 {
37985 player[myPlayer].ToggleLight();
37986 }
37987 mouseLeftRelease = false;
37989 if (netMode == 1)
37990 {
37991 NetMessage.SendData(4, -1, -1, null, myPlayer);
37992 }
37993 }
37994 num26 = ((!player[myPlayer].hideMisc[num25]) ? 1 : 2);
37995 }
37996 }
37997 if (flag2)
37998 {
37999 value2 = TextureAssets.Extra[255].Value;
38000 if (!player[myPlayer].enabledSuperCart)
38001 {
38002 value2 = TextureAssets.Extra[256].Value;
38003 }
38004 r2 = new Microsoft.Xna.Framework.Rectangle(r2.X + r2.Width / 2, r2.Y + r2.Height / 2, r2.Width, r2.Height);
38005 r2.Offset(-r2.Width / 2, -r2.Height / 2);
38007 {
38008 player[myPlayer].mouseInterface = true;
38009 flag3 = true;
38011 {
38012 player[myPlayer].enabledSuperCart = !player[myPlayer].enabledSuperCart;
38013 mouseLeftRelease = false;
38015 if (netMode == 1)
38016 {
38017 NetMessage.SendData(4, -1, -1, null, myPlayer);
38018 }
38019 }
38020 num26 = ((!player[myPlayer].enabledSuperCart) ? 1 : 2);
38021 }
38022 }
38024 {
38025 player[myPlayer].mouseInterface = true;
38026 armorHide = true;
38027 ItemSlot.Handle(inv, context, m);
38028 }
38029 ItemSlot.Draw(spriteBatch, inv, context, m, r.TopLeft());
38030 if (num25 != -1)
38031 {
38032 spriteBatch.Draw(value2, r2.TopLeft(), Microsoft.Xna.Framework.Color.White * 0.7f);
38033 if (num26 > 0)
38034 {
38035 HoverItem = new Item();
38036 hoverItemName = Lang.inter[58 + num26].Value;
38037 }
38038 }
38039 if (flag2)
38040 {
38042 if (num26 > 0)
38043 {
38044 HoverItem = new Item();
38045 hoverItemName = Language.GetTextValue((num26 == 1) ? "GameUI.SuperCartDisabled" : "GameUI.SuperCartEnabled");
38046 }
38047 }
38048 }
38049 }
38050 num24 += 247;
38051 num23 += 8;
38052 int num27 = -1;
38053 int num28 = 0;
38054 int num29 = 3;
38055 int num30 = 260;
38056 if (screenHeight > 630 + num30 * (mapStyle == 1).ToInt())
38057 {
38058 num29++;
38059 }
38060 if (screenHeight > 680 + num30 * (mapStyle == 1).ToInt())
38061 {
38062 num29++;
38063 }
38064 if (screenHeight > 730 + num30 * (mapStyle == 1).ToInt())
38065 {
38066 num29++;
38067 }
38068 int num31 = 46;
38069 for (int n = 0; n < Player.maxBuffs; n++)
38070 {
38071 if (player[myPlayer].buffType[n] != 0)
38072 {
38073 int num32 = num28 / num29;
38074 int num33 = num28 % num29;
38076 num27 = DrawBuffIcon(num27, n, point.X, point.Y);
38077 UILinkPointNavigator.SetPosition(9000 + num28, new Vector2(point.X + 30, point.Y + 30));
38078 num28++;
38079 if (buffAlpha[n] < 0.65f)
38080 {
38081 buffAlpha[n] = 0.65f;
38082 }
38083 }
38084 }
38085 UILinkPointNavigator.Shortcuts.BUFFS_DRAWN = num28;
38086 UILinkPointNavigator.Shortcuts.BUFFS_PER_COLUMN = num29;
38087 if (num27 >= 0)
38088 {
38089 int num34 = player[myPlayer].buffType[num27];
38090 if (num34 > 0)
38091 {
38092 string buffName = Lang.GetBuffName(num34);
38093 string buffTooltip = GetBuffTooltip(player[myPlayer], num34);
38094 if (num34 == 147)
38095 {
38096 bannerMouseOver = true;
38097 }
38098 if (meleeBuff[num34])
38099 {
38100 MouseTextHackZoom(buffName, -10, 0, buffTooltip);
38101 }
38102 else
38103 {
38104 MouseTextHackZoom(buffName, buffTooltip);
38105 }
38106 }
38107 }
38108 }
38109 else if (EquipPage == 1)
38110 {
38112 }
38113 else
38114 {
38115 int num35 = 4;
38116 if (mouseX > screenWidth - 64 - 28 && mouseX < (int)((float)(screenWidth - 64 - 28) + 56f * inventoryScale) && mouseY > num20 && mouseY < (int)((float)num20 + 448f * inventoryScale) && !PlayerInput.IgnoreMouseInterface)
38117 {
38118 player[myPlayer].mouseInterface = true;
38119 }
38120 float num36 = inventoryScale;
38121 bool flag4 = false;
38122 int num37 = num19 - 1;
38123 bool flag5 = LocalPlayer.CanDemonHeartAccessoryBeShown();
38124 bool flag6 = LocalPlayer.CanMasterModeAccessoryBeShown();
38126 {
38127 num37--;
38128 }
38129 int num38 = num37 - 1;
38133 int num39 = -1;
38134 for (int num40 = 0; num40 < 10; num40++)
38135 {
38136 if ((num40 == 8 && !flag5) || (num40 == 9 && !flag6))
38137 {
38138 continue;
38139 }
38140 num39++;
38141 bool flag7 = LocalPlayer.IsItemSlotUnlockedAndUsable(num40);
38142 if (!flag7)
38143 {
38144 flag4 = true;
38145 }
38146 int num41 = screenWidth - 64 - 28;
38147 int num42 = (int)((float)num20 + (float)(num39 * 56) * inventoryScale);
38148 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38149 int num43 = screenWidth - 58;
38150 int num44 = (int)((float)(num20 - 2) + (float)(num39 * 56) * inventoryScale);
38151 int context2 = 8;
38152 if (num40 > 2)
38153 {
38154 num42 += num35;
38155 num44 += num35;
38156 context2 = 10;
38157 }
38159 {
38160 _achievementAdvisor.DrawOneAchievement(spriteBatch, new Vector2(num41 - 10 - 47 - 47 - 14 - 14, num42 + 8), large: false);
38161 UILinkPointNavigator.SetPosition(1570, new Vector2(num41 - 10 - 47 - 47 - 14 - 14, num42 + 8) + new Vector2(20f) * inventoryScale);
38162 }
38163 if (num39 == num37)
38164 {
38166 }
38168 if (player[myPlayer].hideVisibleAccessory[num40])
38169 {
38171 }
38173 int num45 = 0;
38175 {
38176 player[myPlayer].mouseInterface = true;
38178 {
38179 player[myPlayer].hideVisibleAccessory[num40] = !player[myPlayer].hideVisibleAccessory[num40];
38181 if (netMode == 1)
38182 {
38183 NetMessage.SendData(4, -1, -1, null, myPlayer);
38184 }
38185 }
38186 num45 = ((!player[myPlayer].hideVisibleAccessory[num40]) ? 1 : 2);
38187 }
38188 else if (mouseX >= num41 && (float)mouseX <= (float)num41 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num42 && (float)mouseY <= (float)num42 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38189 {
38190 armorHide = true;
38191 player[myPlayer].mouseInterface = true;
38193 if (flag7 || mouseItem.IsAir)
38194 {
38196 }
38198 }
38199 if (flag4)
38200 {
38202 }
38204 if (num40 > 2)
38205 {
38207 if (num45 > 0)
38208 {
38209 HoverItem = new Item();
38210 hoverItemName = Lang.inter[58 + num45].Value;
38211 }
38212 }
38213 }
38214 inventoryBack = color;
38215 if (mouseX > screenWidth - 64 - 28 - 47 && mouseX < (int)((float)(screenWidth - 64 - 20 - 47) + 56f * inventoryScale) && mouseY > num20 && mouseY < (int)((float)num20 + 168f * inventoryScale) && !PlayerInput.IgnoreMouseInterface)
38216 {
38217 player[myPlayer].mouseInterface = true;
38218 }
38219 num39 = -1;
38220 for (int num46 = 10; num46 < 20; num46++)
38221 {
38222 if ((num46 == 18 && !flag5) || (num46 == 19 && !flag6))
38223 {
38224 continue;
38225 }
38226 num39++;
38227 bool num47 = LocalPlayer.IsItemSlotUnlockedAndUsable(num46);
38228 flag4 = !num47;
38229 bool flag8 = !num47 && !mouseItem.IsAir;
38230 int num48 = screenWidth - 64 - 28 - 47;
38231 int num49 = (int)((float)num20 + (float)(num39 * 56) * inventoryScale);
38232 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38233 if (num46 > 12)
38234 {
38235 num49 += num35;
38236 }
38237 int context3 = 9;
38238 if (num46 > 12)
38239 {
38240 context3 = 11;
38241 }
38242 if (mouseX >= num48 && (float)mouseX <= (float)num48 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num49 && (float)mouseY <= (float)num49 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38243 {
38244 player[myPlayer].mouseInterface = true;
38245 armorHide = true;
38247 if (!flag8)
38248 {
38251 }
38253 }
38254 if (flag4)
38255 {
38257 }
38259 }
38260 inventoryBack = color;
38261 if (mouseX > screenWidth - 64 - 28 - 47 && mouseX < (int)((float)(screenWidth - 64 - 20 - 47) + 56f * inventoryScale) && mouseY > num20 && mouseY < (int)((float)num20 + 168f * inventoryScale) && !PlayerInput.IgnoreMouseInterface)
38262 {
38263 player[myPlayer].mouseInterface = true;
38264 }
38265 num39 = -1;
38266 for (int num50 = 0; num50 < 10; num50++)
38267 {
38268 if ((num50 == 8 && !flag5) || (num50 == 9 && !flag6))
38269 {
38270 continue;
38271 }
38272 num39++;
38273 bool num51 = LocalPlayer.IsItemSlotUnlockedAndUsable(num50);
38274 flag4 = !num51;
38275 bool flag9 = !num51 && !mouseItem.IsAir;
38276 int num52 = screenWidth - 64 - 28 - 47 - 47;
38277 int num53 = (int)((float)num20 + (float)(num39 * 56) * inventoryScale);
38278 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38279 if (num50 > 2)
38280 {
38281 num53 += num35;
38282 }
38283 if (mouseX >= num52 && (float)mouseX <= (float)num52 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num53 && (float)mouseY <= (float)num53 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38284 {
38285 player[myPlayer].mouseInterface = true;
38286 armorHide = true;
38288 if (!flag9)
38289 {
38291 {
38293 }
38295 }
38297 }
38298 if (flag4)
38299 {
38301 }
38303 }
38304 inventoryBack = color;
38306 }
38307 int num54 = (screenHeight - 600) / 2;
38308 int num55 = (int)((float)screenHeight / 600f * 250f);
38309 if (screenHeight < 700)
38310 {
38311 num54 = (screenHeight - 508) / 2;
38312 num55 = (int)((float)screenHeight / 600f * 200f);
38313 }
38314 else if (screenHeight < 850)
38315 {
38316 num55 = (int)((float)screenHeight / 600f * 225f);
38317 }
38318 if (craftingHide)
38319 {
38320 craftingAlpha -= 0.1f;
38321 if (craftingAlpha < 0f)
38322 {
38323 craftingAlpha = 0f;
38324 }
38325 }
38326 else
38327 {
38328 craftingAlpha += 0.025f;
38329 if (craftingAlpha > 1f)
38330 {
38331 craftingAlpha = 1f;
38332 }
38333 }
38334 Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color((byte)((float)(int)mouseTextColor * craftingAlpha), (byte)((float)(int)mouseTextColor * craftingAlpha), (byte)((float)(int)mouseTextColor * craftingAlpha), (byte)((float)(int)mouseTextColor * craftingAlpha));
38335 craftingHide = false;
38336 if (InReforgeMenu)
38337 {
38338 if (mouseReforge)
38339 {
38340 if (reforgeScale < 1f)
38341 {
38342 reforgeScale += 0.02f;
38343 }
38344 }
38345 else if (reforgeScale > 1f)
38346 {
38347 reforgeScale -= 0.02f;
38348 }
38349 if (player[myPlayer].chest != -1 || npcShop != 0 || player[myPlayer].talkNPC == -1 || InGuideCraftMenu)
38350 {
38351 InReforgeMenu = false;
38352 player[myPlayer].dropItemCheck();
38353 Recipe.FindRecipes();
38354 }
38355 else
38356 {
38357 int num56 = 50;
38358 int num57 = 270;
38359 string text = Lang.inter[46].Value + ": ";
38360 if (reforgeItem.type > 0)
38361 {
38362 int num58 = reforgeItem.value;
38363 if (player[myPlayer].discountAvailable)
38364 {
38365 num58 = (int)((double)num58 * 0.8);
38366 }
38367 num58 = (int)((double)num58 * player[myPlayer].currentShoppingSettings.PriceAdjustment);
38368 num58 /= 3;
38369 string text2 = "";
38370 int num59 = 0;
38371 int num60 = 0;
38372 int num61 = 0;
38373 int num62 = 0;
38374 int num63 = num58;
38375 if (num63 < 1)
38376 {
38377 num63 = 1;
38378 }
38379 if (num63 >= 1000000)
38380 {
38381 num59 = num63 / 1000000;
38382 num63 -= num59 * 1000000;
38383 }
38384 if (num63 >= 10000)
38385 {
38386 num60 = num63 / 10000;
38387 num63 -= num60 * 10000;
38388 }
38389 if (num63 >= 100)
38390 {
38391 num61 = num63 / 100;
38392 num63 -= num61 * 100;
38393 }
38394 if (num63 >= 1)
38395 {
38396 num62 = num63;
38397 }
38398 if (num59 > 0)
38399 {
38400 text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinPlatinum).Hex3() + ":" + num59 + " " + Lang.inter[15].Value + "] ";
38401 }
38402 if (num60 > 0)
38403 {
38404 text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinGold).Hex3() + ":" + num60 + " " + Lang.inter[16].Value + "] ";
38405 }
38406 if (num61 > 0)
38407 {
38408 text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinSilver).Hex3() + ":" + num61 + " " + Lang.inter[17].Value + "] ";
38409 }
38410 if (num62 > 0)
38411 {
38412 text2 = text2 + "[c/" + Colors.AlphaDarken(Colors.CoinCopper).Hex3() + ":" + num62 + " " + Lang.inter[18].Value + "] ";
38413 }
38414 ItemSlot.DrawSavings(spriteBatch, num56 + 130, invBottom, horizontal: true);
38416 int num64 = num56 + 70;
38417 int num65 = num57 + 40;
38420 if (num66)
38421 {
38422 value4 = TextureAssets.Reforge[1].Value;
38423 }
38424 spriteBatch.Draw(value4, new Vector2(num64, num65), null, Microsoft.Xna.Framework.Color.White, 0f, value4.Size() / 2f, reforgeScale, SpriteEffects.None, 0f);
38425 UILinkPointNavigator.SetPosition(304, new Vector2(num64, num65) + value4.Size() / 4f);
38426 if (num66)
38427 {
38428 hoverItemName = Lang.inter[19].Value;
38429 if (!mouseReforge)
38430 {
38432 }
38433 mouseReforge = true;
38434 player[myPlayer].mouseInterface = true;
38435 if (mouseLeftRelease && mouseLeft && player[myPlayer].BuyItem(num58))
38436 {
38437 reforgeItem.ResetPrefix();
38438 reforgeItem.Prefix(-2);
38439 reforgeItem.position.X = player[myPlayer].position.X + (float)(player[myPlayer].width / 2) - (float)(reforgeItem.width / 2);
38440 reforgeItem.position.Y = player[myPlayer].position.Y + (float)(player[myPlayer].height / 2) - (float)(reforgeItem.height / 2);
38441 PopupText.NewText(PopupTextContext.ItemReforge, reforgeItem, reforgeItem.stack, noStack: true);
38443 }
38444 }
38445 else
38446 {
38447 mouseReforge = false;
38448 }
38449 }
38450 else
38451 {
38452 text = Lang.inter[20].Value;
38453 }
38455 if (mouseX >= num56 && (float)mouseX <= (float)num56 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num57 && (float)mouseY <= (float)num57 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38456 {
38457 player[myPlayer].mouseInterface = true;
38458 craftingHide = true;
38461 {
38462 Recipe.FindRecipes();
38463 }
38466 }
38468 }
38469 }
38470 else if (InGuideCraftMenu)
38471 {
38472 if (player[myPlayer].chest != -1 || npcShop != 0 || player[myPlayer].talkNPC == -1 || InReforgeMenu)
38473 {
38474 InGuideCraftMenu = false;
38475 player[myPlayer].dropItemCheck();
38476 Recipe.FindRecipes();
38477 }
38478 else
38479 {
38481 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38482 if (mouseX >= inventoryX && (float)mouseX <= (float)inventoryX + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= inventoryY && (float)mouseY <= (float)inventoryY + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38483 {
38484 player[myPlayer].mouseInterface = true;
38485 craftingHide = true;
38489 {
38490 Recipe.FindRecipes();
38491 }
38494 }
38496 }
38497 }
38499 bool flag10 = CreativeMenu.Enabled && !CreativeMenu.Blocked;
38500 if (!InReforgeMenu && !LocalPlayer.tileEntityAnchor.InUse && !flag10)
38501 {
38502 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1;
38503 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1;
38504 if (numAvailableRecipes > 0)
38505 {
38506 DynamicSpriteFontExtensionMethods.DrawString(spriteBatch, FontAssets.MouseText.Value, Lang.inter[25].Value, new Vector2(76f, 414 + num54), color3, 0f, default(Vector2), 1f, SpriteEffects.None, 0f);
38507 }
38508 for (int num67 = 0; num67 < Recipe.maxRecipes; num67++)
38509 {
38510 inventoryScale = 100f / (Math.Abs(availableRecipeY[num67]) + 100f);
38511 if ((double)inventoryScale < 0.75)
38512 {
38513 inventoryScale = 0.75f;
38514 }
38515 if (recFastScroll)
38516 {
38517 inventoryScale = 0.75f;
38518 }
38519 if (availableRecipeY[num67] < (float)((num67 - focusRecipe) * 65))
38520 {
38521 if (availableRecipeY[num67] == 0f && !recFastScroll)
38522 {
38524 }
38525 availableRecipeY[num67] += 6.5f;
38526 if (recFastScroll)
38527 {
38528 availableRecipeY[num67] += 130000f;
38529 }
38530 if (availableRecipeY[num67] > (float)((num67 - focusRecipe) * 65))
38531 {
38533 }
38534 }
38535 else if (availableRecipeY[num67] > (float)((num67 - focusRecipe) * 65))
38536 {
38537 if (availableRecipeY[num67] == 0f && !recFastScroll)
38538 {
38540 }
38541 availableRecipeY[num67] -= 6.5f;
38542 if (recFastScroll)
38543 {
38544 availableRecipeY[num67] -= 130000f;
38545 }
38546 if (availableRecipeY[num67] < (float)((num67 - focusRecipe) * 65))
38547 {
38549 }
38550 }
38551 else
38552 {
38553 recFastScroll = false;
38554 }
38556 {
38557 continue;
38558 }
38559 int num68 = (int)(46f - 26f * inventoryScale);
38560 int num69 = (int)(410f + availableRecipeY[num67] * inventoryScale - 30f * inventoryScale + (float)num54);
38561 double num70 = inventoryBack.A + 50;
38562 double num71 = 255.0;
38563 if (Math.Abs(availableRecipeY[num67]) > (float)num55 - 100f)
38564 {
38565 num70 = (double)(150f * (100f - (Math.Abs(availableRecipeY[num67]) - ((float)num55 - 100f)))) * 0.01;
38566 num71 = (double)(255f * (100f - (Math.Abs(availableRecipeY[num67]) - ((float)num55 - 100f)))) * 0.01;
38567 }
38568 new Microsoft.Xna.Framework.Color((byte)num70, (byte)num70, (byte)num70, (byte)num70);
38569 Microsoft.Xna.Framework.Color lightColor = new Microsoft.Xna.Framework.Color((byte)num71, (byte)num71, (byte)num71, (byte)num71);
38570 if (!LocalPlayer.creativeInterface && mouseX >= num68 && (float)mouseX <= (float)num68 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num69 && (float)mouseY <= (float)num69 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38571 {
38573 }
38574 if (numAvailableRecipes <= 0)
38575 {
38576 continue;
38577 }
38578 num70 -= 50.0;
38579 if (num70 < 0.0)
38580 {
38581 num70 = 0.0;
38582 }
38583 if (num67 == focusRecipe)
38584 {
38585 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = 0;
38587 {
38588 ItemSlot.DrawGoldBGForCraftingMaterial = true;
38589 }
38590 }
38591 else
38592 {
38593 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1;
38594 }
38596 inventoryBack = new Microsoft.Xna.Framework.Color((byte)num70, (byte)num70, (byte)num70, (byte)num70);
38597 ItemSlot.Draw(spriteBatch, ref recipe[availableRecipe[num67]].createItem, 22, new Vector2(num68, num69), lightColor);
38599 }
38600 if (numAvailableRecipes > 0)
38601 {
38602 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1;
38603 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1;
38604 for (int num72 = 0; num72 < Recipe.maxRequirements; num72++)
38605 {
38606 if (recipe[availableRecipe[focusRecipe]].requiredItem[num72].type == 0)
38607 {
38608 UILinkPointNavigator.Shortcuts.CRAFT_CurrentIngredientsCount = num72 + 1;
38609 break;
38610 }
38611 int num73 = 80 + num72 * 40;
38612 int num74 = 380 + num54;
38613 double num75 = inventoryBack.A + 50;
38614 double num76 = 255.0;
38617 num75 = (float)(inventoryBack.A + 50) - Math.Abs(availableRecipeY[focusRecipe]) * 2f;
38618 num76 = 255f - Math.Abs(availableRecipeY[focusRecipe]) * 2f;
38619 if (num75 < 0.0)
38620 {
38621 num75 = 0.0;
38622 }
38623 if (num76 < 0.0)
38624 {
38625 num76 = 0.0;
38626 }
38627 white.R = (byte)num75;
38628 white.G = (byte)num75;
38629 white.B = (byte)num75;
38630 white.A = (byte)num75;
38631 white2.R = (byte)num76;
38632 white2.G = (byte)num76;
38633 white2.B = (byte)num76;
38634 white2.A = (byte)num76;
38635 inventoryScale = 0.6f;
38636 if (num75 == 0.0)
38637 {
38638 break;
38639 }
38640 if (mouseX >= num73 && (float)mouseX <= (float)num73 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num74 && (float)mouseY <= (float)num74 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38641 {
38642 craftingHide = true;
38643 player[myPlayer].mouseInterface = true;
38645 }
38646 num75 -= 50.0;
38647 if (num75 < 0.0)
38648 {
38649 num75 = 0.0;
38650 }
38651 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = 1 + num72;
38653 inventoryBack = new Microsoft.Xna.Framework.Color((byte)num75, (byte)num75, (byte)num75, (byte)num75);
38656 }
38657 }
38658 if (numAvailableRecipes == 0)
38659 {
38660 recBigList = false;
38661 }
38662 else
38663 {
38664 int num77 = 94;
38665 int num78 = 450 + num54;
38666 if (InGuideCraftMenu)
38667 {
38668 num78 -= 150;
38669 }
38671 int num79 = recBigList.ToInt() * 2 + flag11.ToInt();
38672 spriteBatch.Draw(TextureAssets.CraftToggle[num79].Value, new Vector2(num77, num78), null, Microsoft.Xna.Framework.Color.White, 0f, TextureAssets.CraftToggle[num79].Value.Size() / 2f, 1f, SpriteEffects.None, 0f);
38673 if (flag11)
38674 {
38675 MouseText(Language.GetTextValue("GameUI.CraftingWindow"), 0, 0);
38676 player[myPlayer].mouseInterface = true;
38678 {
38679 if (!recBigList)
38680 {
38681 recBigList = true;
38683 }
38684 else
38685 {
38686 recBigList = false;
38688 }
38689 }
38690 }
38691 }
38692 }
38693 if (recBigList && !flag10)
38694 {
38695 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = -1;
38696 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeSmall = -1;
38697 int num80 = 42;
38698 if ((double)inventoryScale < 0.75)
38699 {
38700 inventoryScale = 0.75f;
38701 }
38702 int num81 = 340;
38703 int num82 = 310;
38704 int num83 = (screenWidth - num82 - 280) / num80;
38705 int num84 = (screenHeight - num81 - 20) / num80;
38706 UILinkPointNavigator.Shortcuts.CRAFT_IconsPerRow = num83;
38707 UILinkPointNavigator.Shortcuts.CRAFT_IconsPerColumn = num84;
38708 int num85 = 0;
38709 int num86 = 0;
38710 int num87 = num82;
38711 int num88 = num81;
38712 int num89 = num82 - 20;
38713 int num90 = num81 + 2;
38715 {
38717 if (recStart < 0)
38718 {
38719 recStart = 0;
38720 }
38721 }
38722 if (recStart > 0)
38723 {
38725 {
38726 player[myPlayer].mouseInterface = true;
38728 {
38729 recStart -= num83;
38730 if (recStart < 0)
38731 {
38732 recStart = 0;
38733 }
38735 mouseLeftRelease = false;
38736 }
38737 }
38738 spriteBatch.Draw(TextureAssets.CraftUpButton.Value, new Vector2(num89, num90), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.CraftUpButton.Width(), TextureAssets.CraftUpButton.Height()), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0f, default(Vector2), 1f, SpriteEffects.None, 0f);
38739 }
38741 {
38742 num90 += 20;
38744 {
38745 player[myPlayer].mouseInterface = true;
38747 {
38748 recStart += num83;
38751 {
38753 }
38754 mouseLeftRelease = false;
38755 }
38756 }
38757 spriteBatch.Draw(TextureAssets.CraftDownButton.Value, new Vector2(num89, num90), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.CraftUpButton.Width(), TextureAssets.CraftUpButton.Height()), new Microsoft.Xna.Framework.Color(200, 200, 200, 200), 0f, default(Vector2), 1f, SpriteEffects.None, 0f);
38758 }
38759 for (int num91 = recStart; num91 < Recipe.maxRecipes && num91 < numAvailableRecipes; num91++)
38760 {
38761 int num92 = num87;
38762 int num93 = num88;
38763 double num94 = inventoryBack.A + 50;
38764 double num95 = 255.0;
38765 new Microsoft.Xna.Framework.Color((byte)num94, (byte)num94, (byte)num94, (byte)num94);
38766 new Microsoft.Xna.Framework.Color((byte)num95, (byte)num95, (byte)num95, (byte)num95);
38767 if (mouseX >= num92 && (float)mouseX <= (float)num92 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num93 && (float)mouseY <= (float)num93 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38768 {
38769 player[myPlayer].mouseInterface = true;
38771 {
38773 recFastScroll = true;
38774 recBigList = false;
38776 mouseLeftRelease = false;
38778 {
38781 }
38782 }
38783 craftingHide = true;
38784 HoverItem = recipe[availableRecipe[num91]].createItem.Clone();
38785 ItemSlot.MouseHover(22);
38786 hoverItemName = recipe[availableRecipe[num91]].createItem.Name;
38787 if (recipe[availableRecipe[num91]].createItem.stack > 1)
38788 {
38789 hoverItemName = hoverItemName + " (" + recipe[availableRecipe[num91]].createItem.stack + ")";
38790 }
38791 }
38792 if (numAvailableRecipes > 0)
38793 {
38794 num94 -= 50.0;
38795 if (num94 < 0.0)
38796 {
38797 num94 = 0.0;
38798 }
38799 UILinkPointNavigator.Shortcuts.CRAFT_CurrentRecipeBig = num91 - recStart;
38801 inventoryBack = new Microsoft.Xna.Framework.Color((byte)num94, (byte)num94, (byte)num94, (byte)num94);
38804 }
38805 num87 += num80;
38806 num85++;
38807 if (num85 >= num83)
38808 {
38809 num87 = num82;
38810 num88 += num80;
38811 num85 = 0;
38812 num86++;
38813 if (num86 >= num84)
38814 {
38815 break;
38816 }
38817 }
38818 }
38819 }
38820 Vector2 vector2 = FontAssets.MouseText.Value.MeasureString("Coins");
38821 Vector2 vector3 = FontAssets.MouseText.Value.MeasureString(Lang.inter[26].Value);
38822 float num96 = vector2.X / vector3.X;
38824 inventoryScale = 0.6f;
38825 for (int num97 = 0; num97 < 4; num97++)
38826 {
38827 int num98 = 497;
38828 int num99 = (int)(85f + (float)(num97 * 56) * inventoryScale + 20f);
38829 int slot = num97 + 50;
38830 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38831 if (mouseX >= num98 && (float)mouseX <= (float)num98 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num99 && (float)mouseY <= (float)num99 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38832 {
38833 player[myPlayer].mouseInterface = true;
38834 ItemSlot.OverrideHover(player[myPlayer].inventory, 1, slot);
38835 ItemSlot.LeftClick(player[myPlayer].inventory, 1, slot);
38836 ItemSlot.RightClick(player[myPlayer].inventory, 1, slot);
38838 {
38839 Recipe.FindRecipes();
38840 }
38841 ItemSlot.MouseHover(player[myPlayer].inventory, 1, slot);
38842 }
38843 ItemSlot.Draw(spriteBatch, player[myPlayer].inventory, 1, slot, new Vector2(num98, num99));
38844 }
38845 Vector2 vector4 = FontAssets.MouseText.Value.MeasureString("Ammo");
38846 Vector2 vector5 = FontAssets.MouseText.Value.MeasureString(Lang.inter[27].Value);
38847 float num100 = vector4.X / vector5.X;
38849 inventoryScale = 0.6f;
38850 for (int num101 = 0; num101 < 4; num101++)
38851 {
38852 int num102 = 534;
38853 int num103 = (int)(85f + (float)(num101 * 56) * inventoryScale + 20f);
38854 int slot2 = 54 + num101;
38855 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38856 if (mouseX >= num102 && (float)mouseX <= (float)num102 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num103 && (float)mouseY <= (float)num103 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38857 {
38858 player[myPlayer].mouseInterface = true;
38859 ItemSlot.OverrideHover(player[myPlayer].inventory, 2, slot2);
38860 ItemSlot.LeftClick(player[myPlayer].inventory, 2, slot2);
38861 ItemSlot.RightClick(player[myPlayer].inventory, 2, slot2);
38863 {
38864 Recipe.FindRecipes();
38865 }
38866 ItemSlot.MouseHover(player[myPlayer].inventory, 2, slot2);
38867 }
38869 }
38870 if (npcShop > 0 && (!playerInventory || player[myPlayer].talkNPC == -1))
38871 {
38872 SetNPCShopIndex(0);
38873 }
38874 if (npcShop > 0 && !recBigList)
38875 {
38876 Utils.DrawBorderStringFourWay(spriteBatch, FontAssets.MouseText.Value, Lang.inter[28].Value, 504f, invBottom, Microsoft.Xna.Framework.Color.White * ((float)(int)mouseTextColor / 255f), Microsoft.Xna.Framework.Color.Black, Vector2.Zero);
38878 inventoryScale = 0.755f;
38879 if (mouseX > 73 && mouseX < (int)(73f + 560f * inventoryScale) && mouseY > invBottom && mouseY < (int)((float)invBottom + 224f * inventoryScale) && !PlayerInput.IgnoreMouseInterface)
38880 {
38881 player[myPlayer].mouseInterface = true;
38882 }
38883 for (int num104 = 0; num104 < 10; num104++)
38884 {
38885 for (int num105 = 0; num105 < 4; num105++)
38886 {
38887 int num106 = (int)(73f + (float)(num104 * 56) * inventoryScale);
38888 int num107 = (int)((float)invBottom + (float)(num105 * 56) * inventoryScale);
38889 int slot3 = num104 + num105 * 10;
38890 new Microsoft.Xna.Framework.Color(100, 100, 100, 100);
38891 if (mouseX >= num106 && (float)mouseX <= (float)num106 + (float)TextureAssets.InventoryBack.Width() * inventoryScale && mouseY >= num107 && (float)mouseY <= (float)num107 + (float)TextureAssets.InventoryBack.Height() * inventoryScale && !PlayerInput.IgnoreMouseInterface)
38892 {
38894 player[myPlayer].mouseInterface = true;
38898 }
38900 }
38901 }
38902 }
38903 if (player[myPlayer].chest > -1 && !tileContainer[tile[player[myPlayer].chestX, player[myPlayer].chestY].type])
38904 {
38905 player[myPlayer].chest = -1;
38906 Recipe.FindRecipes();
38907 }
38908 int offsetDown = 0;
38909 UIVirtualKeyboard.ShouldHideText = !PlayerInput.SettingsForUI.ShowGamepadHints;
38911 {
38912 offsetDown = 9999;
38913 }
38914 UIVirtualKeyboard.OffsetDown = offsetDown;
38916 LocalPlayer.tileEntityAnchor.GetTileEntity()?.OnInventoryDraw(LocalPlayer, spriteBatch);
38917 if (player[myPlayer].chest == -1 && npcShop == 0)
38918 {
38919 int num108 = 0;
38920 int num109 = 498;
38921 int num110 = 244;
38922 int num111 = TextureAssets.ChestStack[num108].Width();
38923 int num112 = TextureAssets.ChestStack[num108].Height();
38924 UILinkPointNavigator.SetPosition(301, new Vector2((float)num109 + (float)num111 * 0.75f, (float)num110 + (float)num112 * 0.75f));
38926 {
38927 num108 = 1;
38928 if (!allChestStackHover)
38929 {
38931 allChestStackHover = true;
38932 }
38934 {
38935 mouseLeftRelease = false;
38936 player[myPlayer].QuickStackAllChests();
38937 Recipe.FindRecipes();
38938 }
38939 player[myPlayer].mouseInterface = true;
38940 }
38941 else if (allChestStackHover)
38942 {
38944 allChestStackHover = false;
38945 }
38947 if (!mouseText && num108 == 1)
38948 {
38949 MouseText(Language.GetTextValue("GameUI.QuickStackToNearby"), 0, 0);
38950 }
38951 }
38952 if (player[myPlayer].chest != -1 || npcShop != 0)
38953 {
38954 return;
38955 }
38956 int num113 = 0;
38957 int num114 = 534;
38958 int num115 = 244;
38959 int num116 = 30;
38960 int num117 = 30;
38961 UILinkPointNavigator.SetPosition(302, new Vector2((float)num114 + (float)num116 * 0.75f, (float)num115 + (float)num117 * 0.75f));
38962 bool flag12 = false;
38964 {
38965 num113 = 1;
38966 flag12 = true;
38967 player[myPlayer].mouseInterface = true;
38969 {
38970 mouseLeftRelease = false;
38972 Recipe.FindRecipes();
38973 }
38974 }
38976 {
38979 }
38981 spriteBatch.Draw(value5, new Vector2(num114, num115), null, Microsoft.Xna.Framework.Color.White, 0f, default(Vector2), 1f, SpriteEffects.None, 0f);
38982 if (!mouseText && num113 == 1)
38983 {
38984 MouseText(Language.GetTextValue("GameUI.SortInventory"), 0, 0);
38985 }
38986 }
static void DrawString(this SpriteBatch spriteBatch, DynamicSpriteFont spriteFont, string text, Vector2 position, Color color)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
static double Abs(double value)
static void PlaySound(int type, Vector2 position, int style=1)
static Asset< DynamicSpriteFont > MouseText
Definition FontAssets.cs:10
static Asset< Texture2D >[] Reforge
static Asset< Texture2D >[] CraftToggle
static Asset< Texture2D > InventoryBack
static Asset< Texture2D > InventoryTickOff
static Asset< Texture2D >[] InventorySort
static Asset< Texture2D > CraftUpButton
static Asset< Texture2D >[] MapIcon
static Asset< Texture2D >[] Extra
static Asset< Texture2D >[] ChestStack
static Asset< Texture2D > InventoryTickOn
static Asset< Texture2D > CraftDownButton
static Color AlphaDarken(Color input)
Definition Colors.cs:122
static readonly Color CoinGold
Definition Colors.cs:33
static readonly Color CoinPlatinum
Definition Colors.cs:31
static readonly Color CoinSilver
Definition Colors.cs:35
static readonly Color CoinCopper
Definition Colors.cs:37
static readonly LegacySoundStyle Item37
Definition SoundID.cs:488
static string GetTextValue(string key)
Definition Language.cs:15
static float mapFullscreenScale
Definition Main.cs:936
void MouseTextHackZoom(string text, string buffTooltip=null)
Definition Main.cs:18714
static Recipe[] recipe
Definition Main.cs:1791
static float craftingAlpha
Definition Main.cs:1014
static void DrawGuideCraftText(int adjY, Microsoft.Xna.Framework.Color craftingTipColor, out int inventoryX, out int inventoryY)
Definition Main.cs:39175
static int npcChatCornerItem
Definition Main.cs:1837
static Chest[] chest
Definition Main.cs:1699
static void GetBuilderAccsCountToShow(Player plr, out int blockReplaceIcons, out int torchGodIcons, out int totalDrawnIcons)
Definition Main.cs:44512
static int DrawPageIcons(int yPos)
Definition Main.cs:39785
static float[] buffAlpha
Definition Main.cs:1018
static Item[] item
Definition Main.cs:1681
static SpriteBatch spriteBatch
Definition Main.cs:974
static bool[] meleeBuff
Definition Main.cs:782
static void LockCraftingForThisCraftClickDuration()
Definition Main.cs:39309
static bool bannerMouseOver
Definition Main.cs:1244
static bool inventorySortMouseOver
Definition Main.cs:1391
static bool[] tileContainer
Definition Main.cs:1503
static int myPlayer
Definition Main.cs:1801
AchievementAdvisor _achievementAdvisor
Definition Main.cs:377
static int netMode
Definition Main.cs:2095
static int focusRecipe
Definition Main.cs:1799
static void DrawEmoteBubblesButton(int pivotTopLeftX, int pivotTopLeftY)
Definition Main.cs:39420
static CreativeUI CreativeMenu
Definition Main.cs:369
static bool mouseRight
Definition Main.cs:616
int invBottom
Definition Main.cs:1198
static int recStart
Definition Main.cs:1789
static void SetNPCShopIndex(int index)
Definition Main.cs:37260
static void HoverOverCraftingItemButton(int recipeIndex)
Definition Main.cs:39314
static bool mouseLeftRelease
Definition Main.cs:1755
Chest[] shop
Definition Main.cs:1839
static void DrawTrashItemSlot(int pivotTopLeftX, int pivotTopLeftY)
Definition Main.cs:39395
static bool armorHide
Definition Main.cs:1006
static int screenHeight
Definition Main.cs:1721
static void DrawBestiaryIcon(int pivotTopLeftX, int pivotTopLeftY)
Definition Main.cs:39473
static Microsoft.Xna.Framework.Color inventoryBack
Definition Main.cs:2451
static bool mouseText
Definition Main.cs:2453
static Item mouseItem
Definition Main.cs:1773
static int mapStyle
Definition Main.cs:908
static byte mouseTextColor
Definition Main.cs:1751
static int numAvailableRecipes
Definition Main.cs:1797
static float inventoryScale
Definition Main.cs:1779
static bool InReforgeMenu
Definition Main.cs:1908
static Tile[,] tile
Definition Main.cs:1675
static void DrawDefenseCounter(int inventoryX, int inventoryY)
Definition Main.cs:39157
static bool _settingsButtonIsPushedToSide
Definition Main.cs:2485
static Item HoverItem
Definition Main.cs:1910
static int[] availableRecipe
Definition Main.cs:1793
static bool allChestStackHover
Definition Main.cs:1389
static bool mouseRightRelease
Definition Main.cs:1757
static bool craftingHide
Definition Main.cs:1004
static int npcShop
Definition Main.cs:2833
void DrawNPCHousesInUI()
Definition Main.cs:39049
static bool resetMapFull
Definition Main.cs:934
static Item reforgeItem
Definition Main.cs:1777
static string GetBuffTooltip(Player player, int buffType)
Definition Main.cs:40267
static void DrawPVPIcons()
Definition Main.cs:39699
static bool InGuideCraftMenu
Definition Main.cs:1906
static bool recFastScroll
Definition Main.cs:1785
static float armorAlpha
Definition Main.cs:1016
static string hoverItemName
Definition Main.cs:2449
static int DrawBuffIcon(int drawBuffText, int buffSlotOnPlayer, int x, int y)
Definition Main.cs:40312
static bool recBigList
Definition Main.cs:1787
static bool CaptureModeDisabled
Definition Main.cs:279
static void DrawLoadoutButtons(int inventoryTop, bool demonHeartSlotAvailable, bool masterModeSlotAvailable)
Definition Main.cs:38988
static bool mapEnabled
Definition Main.cs:906
void DrawHotbarLockIcon(int pivotTopLeftX, int pivotTopLeftY, bool pushSideToolsUp)
Definition Main.cs:39563
static bool playerInventory
Definition Main.cs:1759
static int screenWidth
Definition Main.cs:1719
static void SetRecipeMaterialDisplayName(int i)
Definition Main.cs:39528
static float[] availableRecipeY
Definition Main.cs:1795
static int mH
Definition Main.cs:2455
static int mouseY
Definition Main.cs:606
static bool ShouldPVPDraw
Definition Main.cs:2875
static Player LocalPlayer
Definition Main.cs:2829
static bool mapFullscreen
Definition Main.cs:932
static Item guideItem
Definition Main.cs:1775
static Player[] player
Definition Main.cs:1803
static int EquipPage
Definition Main.cs:820
void MouseText(string cursorText, int rare=0, byte diff=0, int hackedMouseX=-1, int hackedMouseY=-1, int hackedScreenWidth=-1, int hackedScreenHeight=-1, int pushWidthX=0)
Definition Main.cs:18729
static float reforgeScale
Definition Main.cs:2083
static int mouseX
Definition Main.cs:604
static bool mouseReforge
Definition Main.cs:2081
static bool mouseLeft
Definition Main.cs:614
static bool _cannotDrawAccessoriesHorizontally
Definition Main.cs:2495
void DrawOneAchievement(SpriteBatch spriteBatch, Vector2 position, bool large)
static Vector2 DrawColorCodedStringWithShadow(SpriteBatch spriteBatch, DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, float rotation, Vector2 origin, Vector2 baseScale, out int hoveredSnippet, float maxWidth=-1f, float spread=2f)
static void Draw(SpriteBatch spritebatch)
Definition ChestUI.cs:72
static void SetPosition(int ID, Vector2 Position)
static void Draw(SpriteBatch spriteBatch, ref Item inv, int context, Vector2 position, Color lightColor=default(Color))
Definition ItemSlot.cs:1777
static void OverrideHover(ref Item inv, int context=0)
Definition ItemSlot.cs:322
static void DrawRadialDpad(SpriteBatch sb, Vector2 position)
Definition ItemSlot.cs:3065
static void DrawSavings(SpriteBatch sb, float shopx, float shopy, bool horizontal=false)
Definition ItemSlot.cs:2859
static void RightClick(ref Item inv, int context=0)
Definition ItemSlot.cs:1313
static void LeftClick(ref Item inv, int context=0)
Definition ItemSlot.cs:630
static void MouseHover(int context=0)
Definition ItemSlot.cs:2445
static void Handle(ref Item inv, int context=0)
Definition ItemSlot.cs:302
static void SortInventory()

References Terraria.Main._achievementAdvisor, Terraria.Main._cannotDrawAccessoriesHorizontally, Terraria.Main._settingsButtonIsPushedToSide, System.Math.Abs(), Terraria.Main.allChestStackHover, Terraria.ID.Colors.AlphaDarken(), Terraria.Main.armorAlpha, Terraria.Main.armorHide, Terraria.Main.availableRecipe, Terraria.Main.availableRecipeY, Terraria.Main.bannerMouseOver, Microsoft.Xna.Framework.Color.Black, Terraria.Main.buffAlpha, Terraria.UI.AchievementAdvisor.CanDrawAboveCoins, Terraria.Main.CaptureModeDisabled, Terraria.UI.Gamepad.UILinkPointNavigator.ChangePage(), Terraria.Main.chest, Terraria.GameContent.TextureAssets.ChestStack, Terraria.ID.Colors.CoinCopper, Terraria.ID.Colors.CoinGold, Terraria.ID.Colors.CoinPlatinum, Terraria.ID.Colors.CoinSilver, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), Terraria.GameContent.TextureAssets.CraftDownButton, Terraria.Main.craftingAlpha, Terraria.Main.craftingHide, Terraria.GameContent.TextureAssets.CraftToggle, Terraria.GameContent.TextureAssets.CraftUpButton, Terraria.Main.CreativeMenu, Terraria.UI.ChestUI.Draw(), Terraria.UI.ItemSlot.Draw(), Terraria.Main.DrawBestiaryIcon(), Terraria.Utils.DrawBorderStringFourWay(), Terraria.Main.DrawBuffIcon(), Terraria.UI.Chat.ChatManager.DrawColorCodedStringWithShadow(), Terraria.Main.DrawDefenseCounter(), Terraria.Main.DrawEmoteBubblesButton(), Terraria.Main.DrawGuideCraftText(), Terraria.Main.DrawHotbarLockIcon(), Terraria.Main.DrawLoadoutButtons(), Terraria.Main.DrawNPCHousesInUI(), Terraria.UI.AchievementAdvisor.DrawOneAchievement(), Terraria.Main.DrawPageIcons(), Terraria.Main.DrawPVPIcons(), Terraria.UI.ItemSlot.DrawRadialDpad(), Terraria.UI.ItemSlot.DrawSavings(), ReLogic.Graphics.DynamicSpriteFontExtensionMethods.DrawString(), Terraria.Main.DrawTrashItemSlot(), Terraria.Main.EquipPage, Terraria.GameContent.TextureAssets.Extra, Terraria.Recipe.FindRecipes(), Terraria.Main.focusRecipe, Terraria.Lang.GetBuffName(), Terraria.Main.GetBuffTooltip(), Terraria.Main.GetBuilderAccsCountToShow(), Terraria.Localization.Language.GetTextValue(), Terraria.Recipe.GetThroughDelayedFindRecipes(), Terraria.Main.guideItem, Terraria.UI.ItemSlot.Handle(), Terraria.GameInput.PlayerInput.SettingsForUI.HighlightThingsForMouse, Terraria.Main.HoverItem, Terraria.Main.hoverItemName, Terraria.Main.HoverOverCraftingItemButton(), System.Text.RegularExpressions.i, Terraria.GameInput.PlayerInput.IgnoreMouseInterface, Terraria.Main.InGuideCraftMenu, Terraria.Main.InReforgeMenu, Terraria.Lang.inter, Terraria.Main.invBottom, Terraria.GameContent.TextureAssets.InventoryBack, Terraria.Main.inventoryBack, Terraria.Main.inventoryScale, Terraria.GameContent.TextureAssets.InventorySort, Terraria.Main.inventorySortMouseOver, Terraria.GameContent.TextureAssets.InventoryTickOff, Terraria.GameContent.TextureAssets.InventoryTickOn, Terraria.Main.item, Terraria.ID.SoundID.Item37, Terraria.UI.ItemSlot.LeftClick(), Terraria.Main.LocalPlayer, Terraria.Main.LockCraftingForThisCraftClickDuration(), Terraria.Main.mapEnabled, Terraria.Main.mapFullscreen, Terraria.Main.mapFullscreenScale, Terraria.GameContent.TextureAssets.MapIcon, Terraria.Main.mapStyle, Terraria.Player.maxBuffs, Terraria.Recipe.maxRecipes, Terraria.Recipe.maxRequirements, Terraria.Main.meleeBuff, Terraria.Main.mH, Terraria.UI.ItemSlot.MouseHover(), Terraria.Main.mouseItem, Terraria.Main.mouseLeft, Terraria.Main.mouseLeftRelease, Terraria.Main.mouseReforge, Terraria.Main.mouseRight, Terraria.Main.mouseRightRelease, Terraria.GameContent.FontAssets.MouseText, Terraria.Main.mouseText, Terraria.Main.MouseText(), Terraria.Main.mouseTextColor, Terraria.Main.MouseTextHackZoom(), Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.PopupText.NewText(), Terraria.Main.npcChatCornerItem, Terraria.Main.npcShop, Terraria.Main.numAvailableRecipes, Microsoft.Xna.Framework.Vector2.One, Terraria.UI.ItemSlot.OverrideHover(), Terraria.Main.player, Terraria.Main.playerInventory, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Main.recBigList, Terraria.Main.recFastScroll, Terraria.Main.recipe, Terraria.Main.recStart, Terraria.GameContent.TextureAssets.Reforge, Terraria.Main.reforgeItem, Terraria.Main.reforgeScale, Terraria.Main.resetMapFull, Terraria.UI.ItemSlot.RightClick(), Terraria.Main.screenHeight, Terraria.Main.screenWidth, Terraria.NetMessage.SendData(), Terraria.Main.SetNPCShopIndex(), Terraria.UI.Gamepad.UILinkPointNavigator.SetPosition(), Terraria.Main.SetRecipeMaterialDisplayName(), Terraria.Main.shop, Terraria.Main.ShouldPVPDraw, Terraria.GameInput.PlayerInput.SettingsForUI.ShowGamepadHints, Terraria.UI.ItemSorting.SortInventory(), Terraria.Main.spriteBatch, System.text, Terraria.Main.tile, Terraria.Main.tileContainer, System.type, Terraria.GameInput.PlayerInput.UsingGamepad, Terraria.GameInput.PlayerInput.UsingGamepadUI, System.value, Microsoft.Xna.Framework.Graphics.Vector2, Microsoft.Xna.Framework.Color.White, Microsoft.Xna.Framework.Point.X, Microsoft.Xna.Framework.Point.Y, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.Main.DrawInterface_27_Inventory().