107 {
110 {
112 }
118 int num = 70;
119 float scale = 0.75f;
122 if (flag)
123 {
125 }
127 {
129 }
130 new Vector2(Main.mouseX, Main.mouseY);
131 bool flag4 = Main.mouseLeft && Main.mouseLeftRelease;
139 {
140 Main.player[Main.myPlayer].mouseInterface = true;
141 }
143 if (flag)
144 {
147 }
148 else
149 {
152 }
156 if (flag)
157 {
160 }
162 {
165 }
167 {
169 }
171 {
173 }
175 {
177 }
186 if (flag)
187 {
188 vector4.X -= 55f;
189 }
190 UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_LEFT =
num9 + 1;
191 for (
int j = 0;
j <=
num9;
j++)
192 {
195 {
197 }
199 {
201 }
202 else
203 {
205 }
207 {
209 }
211 {
213 }
214 }
219 {
222 {
225 }
226 }
229 {
232 {
235 }
236 }
239 {
242 {
245 }
246 }
249 {
252 {
255 }
256 }
259 {
262 {
265 }
266 }
269 {
272 {
275 }
276 }
278 {
280 }
282 {
285 {
288 }
289 }
292 {
295 {
297 }
298 }
301 {
304 {
306 Main.menuMode = 10;
307 Main.gameMenu = true;
309 }
310 }
313 {
315 {
317 }
318 }
322 {
323 case 0:
328 break;
329 case 1:
334 break;
335 case 2:
340 break;
341 case 3:
346 break;
347 }
348 if (flag)
349 {
352 }
354 {
357 }
359 {
362 }
363 UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT =
num13;
367 {
368 vector7.Y -= 2f;
369 }
371 if (flag)
372 {
373 vector6.X = vector3.X + vector2.X * 2f / 3f;
374 }
376 {
378 {
380 }
381 else
382 {
384 }
386 {
388 }
390 {
392 }
393 }
396 if (!Main.mouseLeft)
397 {
399 }
401 {
403 }
405 {
410 vector6.X -= num;
412 {
414 {
416 }
419 }
420 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
421 valuePosition.Y -= 3f;
422 float musicVolume =
DrawValueBar(sb, scale, Main.musicVolume);
424 {
427 {
428 Main.musicVolume = musicVolume;
429 }
430 }
432 {
434 {
436 }
438 }
440 {
441 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 2;
442 }
445 {
447 {
449 }
451 }
452 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
453 valuePosition.Y -= 3f;
454 float soundVolume =
DrawValueBar(sb, scale, Main.soundVolume);
456 {
459 {
460 Main.soundVolume = soundVolume;
462 }
463 }
465 {
467 {
469 }
471 }
473 {
474 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 3;
475 }
478 {
480 {
482 }
484 }
485 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
486 valuePosition.Y -= 3f;
487 float ambientVolume =
DrawValueBar(sb, scale, Main.ambientVolume);
489 {
492 {
493 Main.ambientVolume = ambientVolume;
495 }
496 }
498 {
500 {
502 }
504 }
506 {
507 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 4;
508 }
510 vector6.X += num;
517 vector6.X -= num;
520 {
522 }
524 {
526 {
528 }
530 }
531 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
532 valuePosition.Y -= 3f;
535 {
538 {
539 Main.GameZoomTarget =
num15 + 1f;
540 }
541 }
543 {
545 {
547 }
549 }
551 {
552 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 10;
553 }
556 if (Main.temporaryGUIScaleSlider == -1f)
557 {
558 Main.temporaryGUIScaleSlider = Main.UIScaleWanted;
559 }
562 {
564 }
566 {
568 {
570 }
572 }
573 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
574 valuePosition.Y -= 3f;
577 {
580 {
581 Main.temporaryGUIScaleSlider =
num16 * 1.5f + 0.5f;
582 Main.temporaryGUIScaleSlider = (float)(int)(Main.temporaryGUIScaleSlider * 100f) / 100f;
583 Main.temporaryGUIScaleSliderUpdate = true;
585 }
586 }
587 if (!
flag7 && Main.temporaryGUIScaleSliderUpdate && Main.temporaryGUIScaleSlider != -1f)
588 {
589 Main.UIScale = Main.temporaryGUIScaleSlider;
590 Main.temporaryGUIScaleSliderUpdate = false;
591 }
592 if ((
float)Main.mouseX > vector3.X + vector2.X * 2f / 3f + (float)
num4 && (
float)Main.mouseX < valuePosition.X + 3.75f && (float)Main.mouseY >
valuePosition.Y - 10f && (
float)Main.mouseY <= valuePosition.Y + 10f)
593 {
595 {
597 }
599 }
601 {
602 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 11;
603 }
605 vector6.X += num;
613 {
616 {
617 Main.autoSave = !Main.autoSave;
618 }
619 }
622 {
625 {
626 Main.autoPause = !Main.autoPause;
627 }
628 }
631 {
634 {
635 Main.ReversedUpDownArmorSetBonuses = !Main.ReversedUpDownArmorSetBonuses;
636 }
637 }
640 {
641 DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForEverything => Language.GetTextValue("UI.SmartDoorsEnabled"),
642 DoorOpeningHelper.DoorAutoOpeningPreference.EnabledForGamepadOnly => Language.GetTextValue("UI.SmartDoorsGamepad"),
643 _ => Language.GetTextValue("UI.SmartDoorsDisabled"),
645 {
648 {
650 }
651 }
653 string textValue;
654 if (
Player.Settings.HoverControl != 0)
655 {
658 }
659 else
660 {
662 }
664 {
667 {
668 Player.Settings.CycleHoverControl();
669 }
670 }
673 {
676 {
677 Main.SettingsEnabled_AutoReuseAllItems = !Main.SettingsEnabled_AutoReuseAllItems;
678 }
679 }
684 }
686 {
689 {
692 {
693 Main.showItemText = !Main.showItemText;
694 }
695 }
698 {
701 {
702 Main.invasionProgressMode++;
703 if (Main.invasionProgressMode >= 3)
704 {
705 Main.invasionProgressMode = 0;
706 }
707 }
708 }
711 {
714 {
715 Main.placementPreview = !Main.placementPreview;
716 }
717 }
720 {
723 {
725 }
726 }
729 {
732 {
733 Main.MouseShowBuildingGrid = !Main.MouseShowBuildingGrid;
734 }
735 }
738 {
741 {
742 Main.GamepadDisableInstructionsDisplay = !Main.GamepadDisableInstructionsDisplay;
743 }
744 }
748 {
751 {
752 Main.MinimapFrameManagerInstance.CycleSelection();
753 }
754 }
756 vector6.X -= num;
759 {
761 }
763 {
765 {
767 }
769 }
770 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
771 valuePosition.Y -= 3f;
774 {
777 {
778 Main.MapScale =
num18 * 0.5f + 0.5f;
779 }
780 }
782 {
784 {
786 }
788 }
790 {
791 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 12;
792 }
794 vector6.X += num;
798 {
801 {
802 Main.ResourceSetsManager.CycleResourceSet();
803 }
804 }
808 {
811 {
813 }
814 }
817 {
820 {
821 Main.SettingsEnabled_OpaqueBoxBehindTooltips = !Main.SettingsEnabled_OpaqueBoxBehindTooltips;
822 }
823 }
825 }
827 {
830 {
833 {
834 Main.ToggleFullScreen();
835 }
836 }
839 {
842 {
844 for (
int m = 0;
m < Main.numDisplayModes;
m++)
845 {
846 if (Main.displayWidth[
m] == Main.PendingResolutionWidth && Main.displayHeight[
m] == Main.PendingResolutionHeight)
847 {
849 break;
850 }
851 }
853 if (
num20 >= Main.numDisplayModes)
854 {
856 }
857 Main.PendingResolutionWidth = Main.displayWidth[
num20];
858 Main.PendingResolutionHeight = Main.displayHeight[
num20];
859 Main.SetResolution(Main.PendingResolutionWidth, Main.PendingResolutionHeight);
860 }
861 }
863 vector6.X -= num;
865 {
867 {
869 }
872 }
873 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
874 valuePosition.Y -= 3f;
877 {
880 {
881 Main.bgScroll = (int)(
num21 * 100f);
882 Main.caveParallax = 1f - (float)Main.bgScroll / 500f;
883 }
884 }
886 {
888 {
890 }
892 }
894 {
895 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 1;
896 }
898 vector6.X += num;
900 {
903 {
904 Main.CycleFrameSkipMode();
905 }
906 }
909 {
912 {
913 Lighting.NextLightMode();
914 }
915 }
918 {
921 {
922 Main.qaStyle++;
923 if (Main.qaStyle > 3)
924 {
925 Main.qaStyle = 0;
926 }
927 }
928 }
931 {
934 {
935 Main.BackgroundEnabled = !Main.BackgroundEnabled;
936 }
937 }
940 {
943 {
945 }
946 }
949 {
952 {
953 Main.UseHeatDistortion = !Main.UseHeatDistortion;
954 }
955 }
958 {
961 {
962 Main.UseStormEffects = !Main.UseStormEffects;
963 }
964 }
967 {
968 1 => Language.GetTextValue("GameUI.QualityLow"),
969 2 => Language.GetTextValue("GameUI.QualityMedium"),
970 3 => Language.GetTextValue("GameUI.QualityHigh"),
971 _ => Language.GetTextValue("GameUI.QualityOff"),
973 {
976 {
977 Main.WaveQuality = (Main.WaveQuality + 1) % 4;
978 }
979 }
982 {
985 {
986 Main.SettingsEnabled_TilesSwayInWind = !Main.SettingsEnabled_TilesSwayInWind;
987 }
988 }
990 }
992 {
995 if (flag)
996 {
998 }
1000 Main.mouseColorSlider.ApplyToMainLegacyBars();
1006 {
1008 {
1010 }
1012 }
1013 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1014 valuePosition.Y -= 3f;
1015 valuePosition.X -=
num2;
1019 {
1022 {
1023 hSLVector.X = x;
1025 }
1026 }
1028 {
1030 {
1032 }
1034 }
1036 {
1037 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5;
1038 Main.menuMode = 25;
1039 }
1042 {
1044 {
1046 }
1048 }
1049 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1050 valuePosition.Y -= 3f;
1051 valuePosition.X -=
num2;
1055 {
1058 {
1059 hSLVector.Y = x;
1061 }
1062 }
1064 {
1066 {
1068 }
1070 }
1072 {
1073 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6;
1074 Main.menuMode = 25;
1075 }
1078 {
1080 {
1082 }
1084 }
1085 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1086 valuePosition.Y -= 3f;
1087 valuePosition.X -=
num2;
1089 DelegateMethods.v3_1.Z = Utils.GetLerpValue(0.15f, 1f, DelegateMethods.v3_1.Z,
clamped:
true);
1090 x =
DrawValueBar(sb, scale, DelegateMethods.v3_1.Z, 0, DelegateMethods.ColorLerp_HSL_L);
1092 {
1095 {
1096 hSLVector.Z = x * 0.85f + 0.15f;
1098 }
1099 }
1101 {
1103 {
1105 }
1107 }
1109 {
1110 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7;
1111 Main.menuMode = 25;
1112 }
1115 {
1116 hSLVector.Z = 0.15f;
1117 }
1118 Main.mouseColorSlider.SetHSL(
hSLVector);
1119 Main.mouseColor = Main.mouseColorSlider.GetColor();
1124 hSLVector = Main.mouseBorderColorSlider.GetHSLVector();
1126 {
1127 Main.mouseBorderColorSlider.ApplyToMainLegacyBars();
1128 }
1134 {
1136 {
1138 }
1140 }
1141 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1142 valuePosition.Y -= 3f;
1143 valuePosition.X -=
num2;
1147 {
1150 {
1151 hSLVector.X = x;
1153 }
1154 }
1156 {
1158 {
1160 }
1162 }
1164 {
1165 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 5;
1166 Main.menuMode = 252;
1167 }
1170 {
1172 {
1174 }
1176 }
1177 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1178 valuePosition.Y -= 3f;
1179 valuePosition.X -=
num2;
1183 {
1186 {
1187 hSLVector.Y = x;
1189 }
1190 }
1192 {
1194 {
1196 }
1198 }
1200 {
1201 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 6;
1202 Main.menuMode = 252;
1203 }
1206 {
1208 {
1210 }
1212 }
1213 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1214 valuePosition.Y -= 3f;
1215 valuePosition.X -=
num2;
1219 {
1222 {
1223 hSLVector.Z = x;
1225 }
1226 }
1228 {
1230 {
1232 }
1234 }
1236 {
1237 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 7;
1238 Main.menuMode = 252;
1239 }
1242 {
1244 {
1246 }
1248 }
1249 valuePosition.X = vector3.X + vector2.X - (float)(
num4 / 2) - 20f;
1250 valuePosition.Y -= 3f;
1251 valuePosition.X -=
num2;
1253 float num24 = Main.mouseBorderColorSlider.Alpha;
1256 {
1259 {
1262 }
1263 }
1265 {
1267 {
1269 }
1271 }
1273 {
1274 UILinkPointNavigator.Shortcuts.OPTIONS_BUTTON_SPECIALFEATURE = 8;
1275 Main.menuMode = 252;
1276 }
1278 Main.mouseBorderColorSlider.SetHSL(
hSLVector);
1279 Main.mouseBorderColorSlider.Alpha =
num24;
1280 Main.MouseBorderColor = Main.mouseBorderColorSlider.GetColor();
1287 {
1289 txt = Lang.menu[232].Value;
1290 break;
1292 txt = Lang.menu[233].Value;
1293 break;
1295 txt = Lang.menu[234].Value;
1296 break;
1297 }
1299 {
1302 {
1304 }
1305 }
1308 {
1311 {
1312 Player.SmartCursorSettings.SmartBlocksEnabled = !
Player.SmartCursorSettings.SmartBlocksEnabled;
1313 }
1314 }
1317 {
1320 {
1321 Main.cSmartCursorModeIsToggleAndNotHold = !Main.cSmartCursorModeIsToggleAndNotHold;
1322 }
1323 }
1326 {
1329 {
1330 Player.SmartCursorSettings.SmartAxeAfterPickaxe = !
Player.SmartCursorSettings.SmartAxeAfterPickaxe;
1331 }
1332 }
1334 }
1336 {
1338 }
1339 for (
int n = 0;
n <
num9 + 1;
n++)
1340 {
1342 }
1344 if (flag)
1345 {
1346 zero.X = -40f;
1347 }
1349 {
1351 {
1354 }
1355 }
1356 UILinkPointNavigator.Shortcuts.INGAMEOPTIONS_BUTTONS_RIGHT =
num12;
1357 Main.DrawInterface_29_SettingsButton();
1358 Main.DrawGamepadInstructions();
1359 Main.mouseText = false;
1360 Main.instance.GUIBarsDraw();
1361 Main.instance.DrawMouseOver();
1362 Main.DrawCursor(Main.DrawThickCursor());
1363 }
static float Clamp(float value, float min, float max)
static decimal Round(decimal d)
static void PlaySound(int type, Vector2 position, int style=1)
static DoorAutoOpeningPreference PreferenceSettings
static void CyclePreferences()
static Asset< DynamicSpriteFont > ItemStack
static void ToggleShowText()
static bool _canConsumeHover
static float[] rightScale
static bool[] skipRightSlot
static Rectangle _GUIHover
static bool DrawRightSide(SpriteBatch sb, string txt, int i, Vector2 anchor, Vector2 offset, float scale, float colorScale, Color over=default(Color))
static float DrawValueBar(SpriteBatch sb, float scale, float perc, int lockState=0, Utils.ColorLerpMethod colorMethod=null)
static Vector2 valuePosition
static bool DrawLeftSide(SpriteBatch sb, string txt, int i, Vector2 anchor, Vector2 offset, float[] scales, float minscale=0.7f, float maxscale=0.8f, float scalespeed=0.01f)
static Dictionary< int, int > _leftSideCategoryMapping
static GameCulture FromCultureName(CultureName name)
static GameCulture ActiveCulture
static string GetTextValue(string key)
static Terraria.Social.Base.NetSocialModule Network
static void SetPosition(int ID, Vector2 Position)
static void OpenAchievements()
static void OpenKeybinds()
static bool HighlightNewItems
bool Contains(int x, int y)