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

◆ DrawClothesWindow()

void Terraria.Main.DrawClothesWindow ( )
inlineprotected

Definition at line 57151 of file Main.cs.

57152 {
57153 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
57154 //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
57155 //IL_0116: Unknown result type (might be due to invalid IL or missing references)
57156 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
57157 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
57158 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
57159 //IL_0150: Unknown result type (might be due to invalid IL or missing references)
57160 //IL_0155: Unknown result type (might be due to invalid IL or missing references)
57161 //IL_016d: Unknown result type (might be due to invalid IL or missing references)
57162 //IL_0172: Unknown result type (might be due to invalid IL or missing references)
57163 //IL_01a1: Unknown result type (might be due to invalid IL or missing references)
57164 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)
57165 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
57166 //IL_018a: Unknown result type (might be due to invalid IL or missing references)
57167 //IL_018f: Unknown result type (might be due to invalid IL or missing references)
57168 //IL_024d: Unknown result type (might be due to invalid IL or missing references)
57169 //IL_0265: Unknown result type (might be due to invalid IL or missing references)
57170 //IL_029c: Unknown result type (might be due to invalid IL or missing references)
57171 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)
57172 //IL_0314: Unknown result type (might be due to invalid IL or missing references)
57173 //IL_0324: Unknown result type (might be due to invalid IL or missing references)
57174 //IL_0339: Unknown result type (might be due to invalid IL or missing references)
57175 //IL_0349: Unknown result type (might be due to invalid IL or missing references)
57176 //IL_0406: Unknown result type (might be due to invalid IL or missing references)
57177 //IL_040b: Unknown result type (might be due to invalid IL or missing references)
57178 //IL_041b: Unknown result type (might be due to invalid IL or missing references)
57179 //IL_0420: Unknown result type (might be due to invalid IL or missing references)
57180 //IL_0424: Unknown result type (might be due to invalid IL or missing references)
57181 //IL_042e: Unknown result type (might be due to invalid IL or missing references)
57182 //IL_0433: Unknown result type (might be due to invalid IL or missing references)
57183 //IL_035e: Unknown result type (might be due to invalid IL or missing references)
57184 //IL_036e: Unknown result type (might be due to invalid IL or missing references)
57185 //IL_0380: Unknown result type (might be due to invalid IL or missing references)
57186 //IL_0390: Unknown result type (might be due to invalid IL or missing references)
57187 //IL_0453: Unknown result type (might be due to invalid IL or missing references)
57188 //IL_03a2: Unknown result type (might be due to invalid IL or missing references)
57189 //IL_03b2: Unknown result type (might be due to invalid IL or missing references)
57190 //IL_03c4: Unknown result type (might be due to invalid IL or missing references)
57191 //IL_03d4: Unknown result type (might be due to invalid IL or missing references)
57192 //IL_046f: Unknown result type (might be due to invalid IL or missing references)
57193 //IL_04ea: Unknown result type (might be due to invalid IL or missing references)
57194 //IL_04ef: Unknown result type (might be due to invalid IL or missing references)
57195 //IL_05de: Unknown result type (might be due to invalid IL or missing references)
57196 //IL_05e3: Unknown result type (might be due to invalid IL or missing references)
57197 //IL_05f0: Unknown result type (might be due to invalid IL or missing references)
57198 //IL_05f5: Unknown result type (might be due to invalid IL or missing references)
57199 //IL_05f9: Unknown result type (might be due to invalid IL or missing references)
57200 //IL_0603: Unknown result type (might be due to invalid IL or missing references)
57201 //IL_0608: Unknown result type (might be due to invalid IL or missing references)
57202 //IL_04f5: Unknown result type (might be due to invalid IL or missing references)
57203 //IL_04fa: Unknown result type (might be due to invalid IL or missing references)
57204 //IL_0624: Unknown result type (might be due to invalid IL or missing references)
57205 //IL_0640: Unknown result type (might be due to invalid IL or missing references)
57206 //IL_06bb: Unknown result type (might be due to invalid IL or missing references)
57207 //IL_06c0: Unknown result type (might be due to invalid IL or missing references)
57208 //IL_054d: Unknown result type (might be due to invalid IL or missing references)
57209 //IL_0552: Unknown result type (might be due to invalid IL or missing references)
57210 //IL_0554: Unknown result type (might be due to invalid IL or missing references)
57211 //IL_055b: Unknown result type (might be due to invalid IL or missing references)
57212 //IL_0560: Unknown result type (might be due to invalid IL or missing references)
57213 //IL_0576: Unknown result type (might be due to invalid IL or missing references)
57214 //IL_0581: Unknown result type (might be due to invalid IL or missing references)
57215 //IL_0589: Unknown result type (might be due to invalid IL or missing references)
57216 //IL_058e: Unknown result type (might be due to invalid IL or missing references)
57217 //IL_0595: Unknown result type (might be due to invalid IL or missing references)
57218 //IL_06c6: Unknown result type (might be due to invalid IL or missing references)
57219 //IL_06cb: Unknown result type (might be due to invalid IL or missing references)
57220 //IL_053d: Unknown result type (might be due to invalid IL or missing references)
57221 //IL_0536: Unknown result type (might be due to invalid IL or missing references)
57222 //IL_07b6: Unknown result type (might be due to invalid IL or missing references)
57223 //IL_07bb: Unknown result type (might be due to invalid IL or missing references)
57224 //IL_07c0: Unknown result type (might be due to invalid IL or missing references)
57225 //IL_07c8: Unknown result type (might be due to invalid IL or missing references)
57226 //IL_053f: Unknown result type (might be due to invalid IL or missing references)
57227 //IL_083c: Unknown result type (might be due to invalid IL or missing references)
57228 //IL_0841: Unknown result type (might be due to invalid IL or missing references)
57229 //IL_070d: Unknown result type (might be due to invalid IL or missing references)
57230 //IL_0712: Unknown result type (might be due to invalid IL or missing references)
57231 //IL_0714: Unknown result type (might be due to invalid IL or missing references)
57232 //IL_071b: Unknown result type (might be due to invalid IL or missing references)
57233 //IL_0720: Unknown result type (might be due to invalid IL or missing references)
57234 //IL_0736: Unknown result type (might be due to invalid IL or missing references)
57235 //IL_0741: Unknown result type (might be due to invalid IL or missing references)
57236 //IL_0749: Unknown result type (might be due to invalid IL or missing references)
57237 //IL_074e: Unknown result type (might be due to invalid IL or missing references)
57238 //IL_0755: Unknown result type (might be due to invalid IL or missing references)
57239 //IL_06fd: Unknown result type (might be due to invalid IL or missing references)
57240 //IL_06ff: Unknown result type (might be due to invalid IL or missing references)
57241 //IL_090b: Unknown result type (might be due to invalid IL or missing references)
57242 //IL_0910: Unknown result type (might be due to invalid IL or missing references)
57243 //IL_08ab: Unknown result type (might be due to invalid IL or missing references)
57244 //IL_08b0: Unknown result type (might be due to invalid IL or missing references)
57245 //IL_09c7: Unknown result type (might be due to invalid IL or missing references)
57246 //IL_09d6: Unknown result type (might be due to invalid IL or missing references)
57247 //IL_09e0: Unknown result type (might be due to invalid IL or missing references)
57248 //IL_09e5: Unknown result type (might be due to invalid IL or missing references)
57249 //IL_0a0b: Unknown result type (might be due to invalid IL or missing references)
57250 //IL_0a10: Unknown result type (might be due to invalid IL or missing references)
57251 //IL_0a33: Unknown result type (might be due to invalid IL or missing references)
57252 //IL_0a38: Unknown result type (might be due to invalid IL or missing references)
57253 //IL_0a56: Unknown result type (might be due to invalid IL or missing references)
57254 //IL_0a5b: Unknown result type (might be due to invalid IL or missing references)
57255 //IL_0b2e: Unknown result type (might be due to invalid IL or missing references)
57256 //IL_0b33: Unknown result type (might be due to invalid IL or missing references)
57257 //IL_0ace: Unknown result type (might be due to invalid IL or missing references)
57258 //IL_0ad3: Unknown result type (might be due to invalid IL or missing references)
57259 //IL_0bea: Unknown result type (might be due to invalid IL or missing references)
57260 //IL_0bf9: Unknown result type (might be due to invalid IL or missing references)
57261 //IL_0c03: Unknown result type (might be due to invalid IL or missing references)
57262 //IL_0c08: Unknown result type (might be due to invalid IL or missing references)
57263 //IL_0c2e: Unknown result type (might be due to invalid IL or missing references)
57264 //IL_0c33: Unknown result type (might be due to invalid IL or missing references)
57265 //IL_0c5d: Unknown result type (might be due to invalid IL or missing references)
57266 //IL_0c62: Unknown result type (might be due to invalid IL or missing references)
57267 //IL_0c80: Unknown result type (might be due to invalid IL or missing references)
57268 //IL_0c85: Unknown result type (might be due to invalid IL or missing references)
57269 //IL_0d64: Unknown result type (might be due to invalid IL or missing references)
57270 //IL_0d69: Unknown result type (might be due to invalid IL or missing references)
57271 //IL_0cf8: Unknown result type (might be due to invalid IL or missing references)
57272 //IL_0cfd: Unknown result type (might be due to invalid IL or missing references)
57273 //IL_0e30: Unknown result type (might be due to invalid IL or missing references)
57274 //IL_0e3f: Unknown result type (might be due to invalid IL or missing references)
57275 //IL_0e49: Unknown result type (might be due to invalid IL or missing references)
57276 //IL_0e4e: Unknown result type (might be due to invalid IL or missing references)
57277 //IL_0e6c: Unknown result type (might be due to invalid IL or missing references)
57278 //IL_0e71: Unknown result type (might be due to invalid IL or missing references)
57279 //IL_0e88: Unknown result type (might be due to invalid IL or missing references)
57280 //IL_0e8d: Unknown result type (might be due to invalid IL or missing references)
57281 //IL_0ea5: Unknown result type (might be due to invalid IL or missing references)
57282 //IL_0eaa: Unknown result type (might be due to invalid IL or missing references)
57283 //IL_0ec2: Unknown result type (might be due to invalid IL or missing references)
57284 //IL_0ec7: Unknown result type (might be due to invalid IL or missing references)
57285 //IL_0edf: Unknown result type (might be due to invalid IL or missing references)
57286 //IL_0ee4: Unknown result type (might be due to invalid IL or missing references)
57287 //IL_0efc: Unknown result type (might be due to invalid IL or missing references)
57288 //IL_0f01: Unknown result type (might be due to invalid IL or missing references)
57289 //IL_0f19: Unknown result type (might be due to invalid IL or missing references)
57290 //IL_0f1e: Unknown result type (might be due to invalid IL or missing references)
57291 //IL_12ec: Unknown result type (might be due to invalid IL or missing references)
57292 //IL_12f1: Unknown result type (might be due to invalid IL or missing references)
57293 //IL_1306: Unknown result type (might be due to invalid IL or missing references)
57294 //IL_130b: Unknown result type (might be due to invalid IL or missing references)
57295 //IL_133a: Unknown result type (might be due to invalid IL or missing references)
57296 //IL_133f: Unknown result type (might be due to invalid IL or missing references)
57297 //IL_1354: Unknown result type (might be due to invalid IL or missing references)
57298 //IL_1359: Unknown result type (might be due to invalid IL or missing references)
57299 //IL_136e: Unknown result type (might be due to invalid IL or missing references)
57300 //IL_1373: Unknown result type (might be due to invalid IL or missing references)
57301 //IL_1388: Unknown result type (might be due to invalid IL or missing references)
57302 //IL_138d: Unknown result type (might be due to invalid IL or missing references)
57303 //IL_13a2: Unknown result type (might be due to invalid IL or missing references)
57304 //IL_13a7: Unknown result type (might be due to invalid IL or missing references)
57305 //IL_13b1: Unknown result type (might be due to invalid IL or missing references)
57306 //IL_13b6: Unknown result type (might be due to invalid IL or missing references)
57307 //IL_13b8: Unknown result type (might be due to invalid IL or missing references)
57308 //IL_13f7: Unknown result type (might be due to invalid IL or missing references)
57309 //IL_1401: Unknown result type (might be due to invalid IL or missing references)
57310 //IL_1406: Unknown result type (might be due to invalid IL or missing references)
57311 //IL_0fc8: Unknown result type (might be due to invalid IL or missing references)
57312 //IL_0fe3: Unknown result type (might be due to invalid IL or missing references)
57313 //IL_1001: Unknown result type (might be due to invalid IL or missing references)
57314 //IL_100d: Unknown result type (might be due to invalid IL or missing references)
57315 //IL_1013: Unknown result type (might be due to invalid IL or missing references)
57316 //IL_0f54: Unknown result type (might be due to invalid IL or missing references)
57317 //IL_0f6f: Unknown result type (might be due to invalid IL or missing references)
57318 //IL_0f8d: Unknown result type (might be due to invalid IL or missing references)
57319 //IL_0f99: Unknown result type (might be due to invalid IL or missing references)
57320 //IL_0f9f: Unknown result type (might be due to invalid IL or missing references)
57321 //IL_146d: Unknown result type (might be due to invalid IL or missing references)
57322 //IL_1472: Unknown result type (might be due to invalid IL or missing references)
57323 //IL_1481: Unknown result type (might be due to invalid IL or missing references)
57324 //IL_1483: Unknown result type (might be due to invalid IL or missing references)
57325 //IL_149f: Unknown result type (might be due to invalid IL or missing references)
57326 //IL_14bd: Unknown result type (might be due to invalid IL or missing references)
57327 //IL_14d1: Unknown result type (might be due to invalid IL or missing references)
57328 //IL_1412: Unknown result type (might be due to invalid IL or missing references)
57329 //IL_141c: Unknown result type (might be due to invalid IL or missing references)
57330 //IL_1426: Unknown result type (might be due to invalid IL or missing references)
57331 //IL_142b: Unknown result type (might be due to invalid IL or missing references)
57332 //IL_10f1: Unknown result type (might be due to invalid IL or missing references)
57333 //IL_10f6: Unknown result type (might be due to invalid IL or missing references)
57334 //IL_1107: Unknown result type (might be due to invalid IL or missing references)
57335 //IL_110c: Unknown result type (might be due to invalid IL or missing references)
57336 //IL_111e: Unknown result type (might be due to invalid IL or missing references)
57337 //IL_1123: Unknown result type (might be due to invalid IL or missing references)
57338 //IL_1135: Unknown result type (might be due to invalid IL or missing references)
57339 //IL_113a: Unknown result type (might be due to invalid IL or missing references)
57340 //IL_114c: Unknown result type (might be due to invalid IL or missing references)
57341 //IL_1151: Unknown result type (might be due to invalid IL or missing references)
57342 //IL_1163: Unknown result type (might be due to invalid IL or missing references)
57343 //IL_1168: Unknown result type (might be due to invalid IL or missing references)
57344 //IL_1197: Unknown result type (might be due to invalid IL or missing references)
57345 //IL_11b8: Unknown result type (might be due to invalid IL or missing references)
57346 //IL_11c2: Unknown result type (might be due to invalid IL or missing references)
57347 //IL_11cb: Unknown result type (might be due to invalid IL or missing references)
57348 //IL_11d1: Unknown result type (might be due to invalid IL or missing references)
57349 //IL_117a: Unknown result type (might be due to invalid IL or missing references)
57350 //IL_117f: Unknown result type (might be due to invalid IL or missing references)
57351 //IL_1250: Unknown result type (might be due to invalid IL or missing references)
57352 //IL_1262: Unknown result type (might be due to invalid IL or missing references)
57353 //IL_126c: Unknown result type (might be due to invalid IL or missing references)
57354 //IL_1271: Unknown result type (might be due to invalid IL or missing references)
57355 //IL_1209: Unknown result type (might be due to invalid IL or missing references)
57356 //IL_1216: Unknown result type (might be due to invalid IL or missing references)
57357 //IL_1220: Unknown result type (might be due to invalid IL or missing references)
57358 //IL_122c: Unknown result type (might be due to invalid IL or missing references)
57359 //IL_1232: Unknown result type (might be due to invalid IL or missing references)
57360 if (npcChatText != "" || playerInventory || player[myPlayer].chest != -1 || npcShop != 0 || player[myPlayer].talkNPC != -1 || InGuideCraftMenu)
57361 {
57363 return;
57364 }
57366 {
57368 return;
57369 }
57370 int num = 477;
57371 int num12 = num / 2;
57372 num12 = 180;
57373 num = 511;
57374 num -= num / 2 - num12 - 26;
57375 int num17 = screenHeight / 2 + 60;
57376 int num18 = screenWidth / 2 - num / 2;
57377 int num19 = num17 + 32;
57378 int num20 = num18 + 22;
57379 num19 -= 16;
57380 int num21 = num18 + num - num12;
57381 int num22 = num17 + 18;
57382 if (selClothes == 0)
57383 {
57384 selColor = player[myPlayer].shirtColor;
57385 }
57386 if (selClothes == 1)
57387 {
57388 selColor = player[myPlayer].underShirtColor;
57389 }
57390 if (selClothes == 2)
57391 {
57392 selColor = player[myPlayer].pantsColor;
57393 }
57394 if (selClothes == 3)
57395 {
57396 selColor = player[myPlayer].shoeColor;
57397 }
57398 if (selClothes == 4)
57399 {
57400 selColor = player[myPlayer].eyeColor;
57401 }
57402 if (selClothes == 5)
57403 {
57404 selColor = player[myPlayer].skinColor;
57405 }
57406 Utils.DrawInvBG(spriteBatch, new Rectangle(num18, num17, num, 133));
57408 {
57409 player[myPlayer].mouseInterface = true;
57410 }
57411 Vector2 vector = default(Vector2);
57412 ((Vector2)(ref vector))._002Ector((float)(num18 + num / 2 - 16 - 28), (float)(num17 + 66 + dresserInterfaceDummy.height / 2 - 20));
57413 vector.Y += 18f;
57414 vector.X += 58f;
57415 Rectangle r = default(Rectangle);
57416 ((Rectangle)(ref r))._002Ector((int)vector.X - dresserInterfaceDummy.width / 2 - 15, (int)vector.Y - dresserInterfaceDummy.height - 33, dresserInterfaceDummy.width + 30, dresserInterfaceDummy.height + 66);
57417 bool flag = ((Rectangle)(ref r)).Contains(MouseScreen.ToPoint());
57418 int num23 = selClothes;
57419 int num2 = (mouseTextColor * 2 + 255) / 3;
57420 Color color = default(Color);
57421 ((Color)(ref color))._002Ector(num2, (int)((double)num2 / 1.1), num2 / 2, num2);
57422 float num3 = 0.9f;
57423 string textValue = Language.GetTextValue("GameUI.Change");
57424 int num4 = num18 + num - num12 + 22;
57425 num4 = num18 + 22;
57426 int num5 = num17 + 94;
57427 bool flag2 = false;
57428 if (oldClothesColor[0] != player[myPlayer].shirtColor || oldClothesColor[1] != player[myPlayer].underShirtColor || oldClothesColor[2] != player[myPlayer].pantsColor || oldClothesColor[3] != player[myPlayer].shoeColor || oldClothesColor[4] != player[myPlayer].eyeColor || oldClothesColor[5] != player[myPlayer].skinColor || oldClothesStyle != player[myPlayer].skinVariant)
57429 {
57430 flag2 = true;
57431 }
57432 Vector2 vector2 = FontAssets.MouseText.Value.MeasureString(textValue);
57433 bool flag3 = false;
57434 UILinkPointNavigator.SetPosition(2803, new Vector2((float)num4, (float)num5) + vector2 * num3 * 0.5f);
57435 if (flag2 && mouseX > num4 && (float)mouseX < (float)num4 + vector2.X && mouseY > num5 && (float)mouseY < (float)num5 + vector2.Y)
57436 {
57437 flag3 = true;
57438 num3 = 1.1f;
57439 if (!npcChatFocus1)
57440 {
57442 }
57443 npcChatFocus1 = true;
57444 player[myPlayer].releaseUseItem = false;
57445 }
57446 else
57447 {
57448 if (npcChatFocus1)
57449 {
57451 }
57452 npcChatFocus1 = false;
57453 }
57454 for (int i = 0; i < 5; i++)
57455 {
57456 int num6 = num4;
57457 int num7 = num5;
57458 Color color2 = Color.Black;
57459 if (flag3)
57460 {
57461 color2 = Color.Brown;
57462 }
57463 if (i == 0)
57464 {
57465 num6 -= 2;
57466 }
57467 if (i == 1)
57468 {
57469 num6 += 2;
57470 }
57471 if (i == 2)
57472 {
57473 num7 -= 2;
57474 }
57475 if (i == 3)
57476 {
57477 num7 += 2;
57478 }
57479 if (i == 4)
57480 {
57481 color2 = (Color)(flag2 ? color : new Color(100, 100, 100));
57482 }
57483 Vector2 origin = FontAssets.MouseText.Value.MeasureString(textValue);
57484 origin *= 0.5f;
57485 spriteBatch.DrawString(FontAssets.MouseText.Value, textValue, new Vector2((float)num6 + origin.X, (float)num7 + origin.Y), color2, 0f, origin, num3, (SpriteEffects)0, 0f);
57486 }
57487 num3 = 0.9f;
57488 string textValue2 = Language.GetTextValue("GameUI.Cancel");
57489 num4 += 130;
57490 bool flag4 = false;
57491 vector2 = FontAssets.MouseText.Value.MeasureString(textValue2);
57492 UILinkPointNavigator.SetPosition(2804, new Vector2((float)num4, (float)num5) + vector2 * num3 * 0.5f);
57493 if (mouseX > num4 && (float)mouseX < (float)num4 + vector2.X && mouseY > num5 && (float)mouseY < (float)num5 + vector2.Y)
57494 {
57495 flag4 = true;
57496 num3 = 1.1f;
57497 if (!npcChatFocus2)
57498 {
57500 }
57501 npcChatFocus2 = true;
57502 player[myPlayer].releaseUseItem = false;
57503 }
57504 else
57505 {
57506 if (npcChatFocus2)
57507 {
57509 }
57510 npcChatFocus2 = false;
57511 }
57512 for (int j = 0; j < 5; j++)
57513 {
57514 int num8 = num4;
57515 int num9 = num5;
57516 Color color3 = Color.Black;
57517 if (flag4)
57518 {
57519 color3 = Color.Brown;
57520 }
57521 if (j == 0)
57522 {
57523 num8 -= 2;
57524 }
57525 if (j == 1)
57526 {
57527 num8 += 2;
57528 }
57529 if (j == 2)
57530 {
57531 num9 -= 2;
57532 }
57533 if (j == 3)
57534 {
57535 num9 += 2;
57536 }
57537 if (j == 4)
57538 {
57539 color3 = color;
57540 }
57541 Vector2 origin2 = FontAssets.MouseText.Value.MeasureString(textValue2);
57542 origin2 *= 0.5f;
57543 spriteBatch.DrawString(FontAssets.MouseText.Value, textValue2, new Vector2((float)num8 + origin2.X, (float)num9 + origin2.Y), color3, 0f, origin2, num3, (SpriteEffects)0, 0f);
57544 }
57546 {
57547 if (npcChatFocus1)
57548 {
57550 return;
57551 }
57552 if (npcChatFocus2)
57553 {
57555 return;
57556 }
57557 }
57558 if (!mouseLeft)
57559 {
57560 grabColorSlider = 0;
57561 blockMouse = false;
57562 }
57563 int num10 = 167;
57564 Vector3 val = rgbToHsl(selColor);
57565 float num11 = val.X;
57566 float num13 = val.Y;
57567 float z = val.Z;
57568 if (hBar == -1f || sBar == -1f || lBar == -1f)
57569 {
57570 hBar = num11;
57571 sBar = num13;
57572 lBar = z;
57573 }
57574 else
57575 {
57576 num11 = hBar;
57577 num13 = sBar;
57578 z = lBar;
57579 }
57580 spriteBatch.Draw(TextureAssets.Hue.Value, new Vector2((float)num20, (float)num19), Color.White);
57581 if ((mouseX > num20 - 4 && mouseX < num20 + TextureAssets.Hue.Width() + 4 && mouseY > num19 - 4 && mouseY < num19 + TextureAssets.Hue.Height() + 4) || grabColorSlider == 1)
57582 {
57583 spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float)num20, (float)num19), OurFavoriteColor);
57584 }
57585 spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float)num20 + (float)(TextureAssets.Hue.Width() - 2) * hBar - (float)(TextureAssets.ColorSlider.Width() / 2), (float)(num19 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Color.White);
57586 if (((mouseX > num20 - 4 && mouseX < num20 + TextureAssets.Hue.Width() + 4 && mouseY > num19 - 4 && mouseY < num19 + TextureAssets.Hue.Height() + 4) || grabColorSlider == 1) && mouseLeft && !blockMouse)
57587 {
57588 grabColorSlider = 1;
57589 num11 = mouseX - num20;
57590 num11 /= (float)TextureAssets.Hue.Width();
57591 if (num11 < 0f)
57592 {
57593 num11 = 0f;
57594 }
57595 if (num11 > 1f)
57596 {
57597 num11 = 1f;
57598 }
57599 hBar = num11;
57600 }
57601 UILinkPointNavigator.SetPosition(2800, new Vector2((float)num20, (float)num19) + TextureAssets.Hue.Value.Size() / 2f);
57602 num19 += 26;
57603 spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float)num20, (float)num19), Color.White);
57604 for (int k = 0; k <= num10; k++)
57605 {
57606 float saturation = (float)k / (float)num10;
57607 Color color4 = hslToRgb(num11, saturation, z);
57608 spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float)(num20 + k + 5), (float)(num19 + 4)), color4);
57609 }
57610 if ((mouseX > num20 - 4 && mouseX < num20 + TextureAssets.Hue.Width() + 4 && mouseY > num19 - 4 && mouseY < num19 + TextureAssets.Hue.Height() + 4) || grabColorSlider == 2)
57611 {
57612 spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float)num20, (float)num19), OurFavoriteColor);
57613 }
57614 spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float)num20 + (float)(TextureAssets.Hue.Width() - 2) * sBar - (float)(TextureAssets.ColorSlider.Width() / 2), (float)(num19 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Color.White);
57615 if (((mouseX > num20 - 4 && mouseX < num20 + TextureAssets.Hue.Width() + 4 && mouseY > num19 - 4 && mouseY < num19 + TextureAssets.Hue.Height() + 4) || grabColorSlider == 2) && mouseLeft && !blockMouse)
57616 {
57617 grabColorSlider = 2;
57618 num13 = mouseX - num20;
57619 num13 /= (float)TextureAssets.Hue.Width();
57620 if (num13 < 0f)
57621 {
57622 num13 = 0f;
57623 }
57624 if (num13 > 1f)
57625 {
57626 num13 = 1f;
57627 }
57628 sBar = num13;
57629 }
57630 UILinkPointNavigator.SetPosition(2801, new Vector2((float)num20, (float)num19) + TextureAssets.Hue.Value.Size() / 2f);
57631 num19 += 26;
57632 spriteBatch.Draw(TextureAssets.ColorBar.Value, new Vector2((float)num20, (float)num19), Color.White);
57633 float num14 = 0.15f;
57634 for (int l = 0; l <= num10; l++)
57635 {
57636 float luminosity = (float)l / (float)num10;
57638 spriteBatch.Draw(TextureAssets.ColorBlip.Value, new Vector2((float)(num20 + l + 5), (float)(num19 + 4)), color5);
57639 }
57640 if ((mouseX > num20 - 4 && mouseX < num20 + TextureAssets.Hue.Width() + 4 && mouseY > num19 - 4 && mouseY < num19 + TextureAssets.Hue.Height() + 4) || grabColorSlider == 3)
57641 {
57642 spriteBatch.Draw(TextureAssets.ColorHighlight.Value, new Vector2((float)num20, (float)num19), OurFavoriteColor);
57643 }
57644 spriteBatch.Draw(TextureAssets.ColorSlider.Value, new Vector2((float)num20 + (float)(TextureAssets.Hue.Width() - 2) * ((lBar - num14) / (1f - num14)) - (float)(TextureAssets.ColorSlider.Width() / 2), (float)(num19 - TextureAssets.ColorSlider.Height() / 2 + TextureAssets.Hue.Height() / 2)), Color.White);
57645 if (((mouseX > num20 - 4 && mouseX < num20 + TextureAssets.Hue.Width() + 4 && mouseY > num19 - 4 && mouseY < num19 + TextureAssets.Hue.Height() + 4) || grabColorSlider == 3) && mouseLeft && !blockMouse)
57646 {
57647 grabColorSlider = 3;
57648 z = mouseX - num20;
57649 z /= (float)TextureAssets.Hue.Width();
57650 if (z < 0f)
57651 {
57652 z = 0f;
57653 }
57654 if (z > 1f)
57655 {
57656 z = 1f;
57657 }
57658 z = z * (1f - num14) + num14;
57659 lBar = z;
57660 }
57661 UILinkPointNavigator.SetPosition(2802, new Vector2((float)num20, (float)num19) + TextureAssets.Hue.Value.Size() / 2f);
57663 if (selClothes == 0)
57664 {
57665 player[myPlayer].shirtColor = selColor;
57666 }
57667 if (selClothes == 1)
57668 {
57669 player[myPlayer].underShirtColor = selColor;
57670 }
57671 if (selClothes == 2)
57672 {
57673 player[myPlayer].pantsColor = selColor;
57674 }
57675 if (selClothes == 3)
57676 {
57677 player[myPlayer].shoeColor = selColor;
57678 }
57679 if (selClothes == 4)
57680 {
57681 player[myPlayer].eyeColor = selColor;
57682 }
57683 if (selClothes == 5)
57684 {
57685 player[myPlayer].skinColor = selColor;
57686 }
57687 int num15 = num21;
57688 int num16 = num22;
57689 num16 -= 8;
57690 for (int m = 0; m < 6; m++)
57691 {
57692 if (num23 == m)
57693 {
57694 spriteBatch.Draw(TextureAssets.InventoryBack14.Value, new Vector2((float)num15, (float)num16), (Rectangle?)new Rectangle(0, 0, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height()), new Color(200, 200, 200, 200), 0f, default(Vector2), 1f, (SpriteEffects)0, 0f);
57695 }
57696 else
57697 {
57698 spriteBatch.Draw(TextureAssets.InventoryBack8.Value, new Vector2((float)num15, (float)num16), (Rectangle?)new Rectangle(0, 0, TextureAssets.InventoryBack.Width(), TextureAssets.InventoryBack.Height()), new Color(200, 200, 200, 200), 0f, default(Vector2), 1f, (SpriteEffects)0, 0f);
57699 }
57701 {
57702 mouseLeftRelease = false;
57703 selClothes = m;
57705 hBar = -1f;
57706 lBar = -1f;
57707 sBar = -1f;
57708 }
57709 float x = num15 + TextureAssets.InventoryBack.Width() / 2 - TextureAssets.Clothes[m].Width() / 2;
57710 float y = num16 + TextureAssets.InventoryBack.Height() / 2 - TextureAssets.Clothes[m].Height() / 2;
57711 Color color6 = Color.White;
57712 if (m == 0)
57713 {
57714 color6 = player[myPlayer].shirtColor;
57715 }
57716 if (m == 1)
57717 {
57718 color6 = player[myPlayer].underShirtColor;
57719 }
57720 if (m == 2)
57721 {
57722 color6 = player[myPlayer].pantsColor;
57723 }
57724 if (m == 3)
57725 {
57726 color6 = player[myPlayer].shoeColor;
57727 }
57728 if (m == 4)
57729 {
57730 color6 = player[myPlayer].eyeColor;
57731 }
57732 if (m == 5)
57733 {
57734 color6 = player[myPlayer].skinColor;
57735 }
57736 spriteBatch.Draw(TextureAssets.Clothes[m].Value, new Vector2(x, y), (Rectangle?)new Rectangle(0, 0, TextureAssets.Clothes[m].Width(), TextureAssets.Clothes[m].Height()), color6, 0f, default(Vector2), 1f, (SpriteEffects)0, 0f);
57737 if (m == 4)
57738 {
57739 Texture2D value = Assets.Request<Texture2D>("Images/UI/CharCreation/ColorEyeBack").Value;
57740 spriteBatch.Draw(value, new Vector2(x, y), (Rectangle?)value.Frame(), Color.White, 0f, default(Vector2), 1f, (SpriteEffects)0, 0f);
57741 }
57742 UILinkPointNavigator.SetPosition(2806 + m, new Vector2(x, y) + TextureAssets.Clothes[m].Value.Size() * 0.75f);
57743 num15 += 56;
57744 if (m == 1)
57745 {
57746 num15 -= 112;
57747 num16 += 56;
57748 }
57749 if (m == 3)
57750 {
57751 num16 -= 56;
57752 }
57753 if (m == 4)
57754 {
57755 num16 += 56;
57756 num15 -= 56;
57757 }
57758 }
57759 dresserInterfaceDummy.skinVariant = player[myPlayer].skinVariant;
57760 dresserInterfaceDummy.eyeColor = player[myPlayer].eyeColor;
57761 dresserInterfaceDummy.hairColor = player[myPlayer].hairColor;
57762 dresserInterfaceDummy.hair = player[myPlayer].hair;
57763 dresserInterfaceDummy.skinColor = player[myPlayer].skinColor;
57764 dresserInterfaceDummy.shirtColor = player[myPlayer].shirtColor;
57765 dresserInterfaceDummy.underShirtColor = player[myPlayer].underShirtColor;
57766 dresserInterfaceDummy.shoeColor = player[myPlayer].shoeColor;
57767 dresserInterfaceDummy.pantsColor = player[myPlayer].pantsColor;
57768 dresserInterfaceDummy.Bottom = screenPosition + vector;
57769 dresserInterfaceDummy.direction = -1;
57770 dresserInterfaceDummy.gravDir = 1f;
57771 dresserInterfaceDummy.PlayerFrame();
57772 dresserInterfaceDummy.socialIgnoreLight = true;
57773 Color c = new Color(46, 106, 98) * 0.6f;
57774 if (flag)
57775 {
57776 c = new Color(46, 106, 98) * 2f * 0.6f;
57778 {
57779 mouseLeftRelease = false;
57782 }
57783 }
57784 UILinkPointNavigator.SetPosition(2805, ((Rectangle)(ref r)).Center.ToVector2());
57785 Utils.DrawInvBG(spriteBatch, r, c);
57786 spriteBatch.End();
57787 spriteBatch.Begin((SpriteSortMode)1, (BlendState)null, (SamplerState)null, (DepthStencilState)null, (RasterizerState)null, (Effect)null, UIScaleMatrix);
57789 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
static Asset< DynamicSpriteFont > MouseText
Definition FontAssets.cs:10
static Asset< Texture2D > ColorHighlight
static Asset< Texture2D > InventoryBack8
static Asset< Texture2D > InventoryBack
static Asset< Texture2D > Hue
static Asset< Texture2D > ClothesStyleBack
static Asset< Texture2D > ColorSlider
static Asset< Texture2D > InventoryBack14
static Asset< Texture2D > ColorBlip
static Asset< Texture2D >[] Clothes
static Asset< Texture2D > ColorBar
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
int grabColorSlider
Definition Main.cs:2602
static Vector3 rgbToHsl(Color newColor)
Definition Main.cs:61911
static float lBar
Definition Main.cs:2598
static Color hslToRgb(Vector3 hslVector)
Definition Main.cs:61847
static float sBar
Definition Main.cs:2596
static bool npcChatFocus1
Definition Main.cs:1984
static int interactedDresserTopLeftX
Definition Main.cs:2554
static Color[] oldClothesColor
Definition Main.cs:2550
static bool npcChatFocus2
Definition Main.cs:1986
static string npcChatText
Definition Main.cs:1982
static Chest[] chest
Definition Main.cs:1844
static SpriteBatch spriteBatch
Definition Main.cs:1043
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static IPlayerRenderer PlayerRenderer
Definition Main.cs:319
static bool mouseLeftRelease
Definition Main.cs:1908
static bool blockMouse
Definition Main.cs:2604
static int screenHeight
Definition Main.cs:1870
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
static Vector2 MouseScreen
Fetches the position of the mouse cursor on the screen. Useful for making things visually happen nea...
Definition Main.cs:2938
static byte mouseTextColor
A value that oscillates between 190 and 255. It is used to drive the slight pulsing color effect seen...
Definition Main.cs:1904
static Matrix UIScaleMatrix
Definition Main.cs:2777
static void SaveClothesWindow()
Definition Main.cs:57144
static Color OurFavoriteColor
Definition Main.cs:971
static Color selColor
Definition Main.cs:2580
static float hBar
Definition Main.cs:2594
static int npcShop
Definition Main.cs:3005
static bool InGuideCraftMenu
Definition Main.cs:2056
static int interactedDresserTopLeftY
Definition Main.cs:2556
static bool playerInventory
Definition Main.cs:1912
static int screenWidth
Definition Main.cs:1868
static void CycleClothingStyle(Player plr)
Definition Main.cs:66740
static Player dresserInterfaceDummy
Definition Main.cs:2558
static int selClothes
Definition Main.cs:2548
static int mouseY
Definition Main.cs:634
static Tilemap tile
Definition Main.cs:1820
static Player LocalPlayer
Retrieves the T:Terraria.Player object for the local user. Shorthand for F:Terraria....
Definition Main.cs:3001
static int oldClothesStyle
Definition Main.cs:2552
static Player[] player
Definition Main.cs:1960
static void CancelClothesWindow(bool quiet=false)
Definition Main.cs:57111
static int mouseX
Definition Main.cs:632
static bool mouseLeft
Definition Main.cs:642
static void SetPosition(int ID, Vector2 Position)

References Terraria.Main.blockMouse, Terraria.Main.CancelClothesWindow(), Terraria.Main.chest, Terraria.GameContent.TextureAssets.Clothes, Terraria.GameContent.TextureAssets.ClothesStyleBack, Terraria.Graphics.Light.Color, Terraria.GameContent.TextureAssets.ColorBar, Terraria.GameContent.TextureAssets.ColorBlip, Terraria.GameContent.TextureAssets.ColorHighlight, Terraria.GameContent.TextureAssets.ColorSlider, Terraria.Main.CycleClothingStyle(), Terraria.Utils.DrawInvBG(), Terraria.Main.dresserInterfaceDummy, Terraria.Localization.Language.GetTextValue(), Terraria.Main.grabColorSlider, Terraria.Main.hBar, Terraria.Main.hslToRgb(), Terraria.GameContent.TextureAssets.Hue, Terraria.GameInput.PlayerInput.IgnoreMouseInterface, Terraria.Main.InGuideCraftMenu, Terraria.Main.interactedDresserTopLeftX, Terraria.Main.interactedDresserTopLeftY, Terraria.GameContent.TextureAssets.InventoryBack, Terraria.GameContent.TextureAssets.InventoryBack14, Terraria.GameContent.TextureAssets.InventoryBack8, Terraria.Main.lBar, Terraria.Main.LocalPlayer, Terraria.Main.mouseLeft, Terraria.Main.mouseLeftRelease, Terraria.Main.MouseScreen, Terraria.GameContent.FontAssets.MouseText, Terraria.Main.mouseTextColor, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.myPlayer, Terraria.Main.npcChatFocus1, Terraria.Main.npcChatFocus2, Terraria.Main.npcChatText, Terraria.Main.npcShop, Terraria.Main.oldClothesColor, Terraria.Main.oldClothesStyle, Terraria.Main.OurFavoriteColor, Terraria.Main.player, Terraria.Main.playerInventory, Terraria.Main.PlayerRenderer, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Main.rgbToHsl(), Terraria.Main.SaveClothesWindow(), Terraria.Main.sBar, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Main.selClothes, Terraria.Main.selColor, Terraria.UI.Gamepad.UILinkPointNavigator.SetPosition(), Terraria.Main.spriteBatch, Terraria.Main.tile, and Terraria.Main.UIScaleMatrix.

Referenced by Terraria.Main.DrawInterface_22_DresserWindow().

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