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

◆ QuickModDelete()

void Terraria.ModLoader.UI.UIModItem.QuickModDelete ( UIMouseEvent evt,
UIElement listeningElement )
inlineprivate

Definition at line 759 of file UIModItem.cs.

760 {
761 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
762 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
763 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
764 //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
765 //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
766 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
767 //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
768 //IL_012e: Unknown result type (might be due to invalid IL or missing references)
769 //IL_0175: Unknown result type (might be due to invalid IL or missing references)
770 //IL_017b: Unknown result type (might be due to invalid IL or missing references)
771 //IL_017e: Unknown result type (might be due to invalid IL or missing references)
772 //IL_0184: Unknown result type (might be due to invalid IL or missing references)
773 //IL_0187: Unknown result type (might be due to invalid IL or missing references)
774 //IL_018d: Unknown result type (might be due to invalid IL or missing references)
775 //IL_0190: Unknown result type (might be due to invalid IL or missing references)
776 //IL_0196: Unknown result type (might be due to invalid IL or missing references)
777 //IL_01e0: Unknown result type (might be due to invalid IL or missing references)
778 //IL_0227: Unknown result type (might be due to invalid IL or missing references)
779 //IL_022d: Unknown result type (might be due to invalid IL or missing references)
780 //IL_0230: Unknown result type (might be due to invalid IL or missing references)
781 //IL_0236: Unknown result type (might be due to invalid IL or missing references)
782 //IL_0239: Unknown result type (might be due to invalid IL or missing references)
783 //IL_023f: Unknown result type (might be due to invalid IL or missing references)
784 //IL_0242: Unknown result type (might be due to invalid IL or missing references)
785 //IL_0248: Unknown result type (might be due to invalid IL or missing references)
786 if (!Main.keyState.PressingShift())
787 {
790 {
791 Width =
792 {
793 Percent = 1f
794 },
795 Height =
796 {
797 Percent = 1f
798 },
799 Color = new Color(0, 0, 0, 0),
800 ScaleToFit = true
801 };
802 _blockInput.OnLeftMouseDown += CloseDialog;
803 Interface.modsMenu.Append(_blockInput);
805 {
806 Width =
807 {
808 Percent = 0.3f
809 },
810 Height =
811 {
812 Percent = 0.3f
813 },
814 HAlign = 0.5f,
815 VAlign = 0.5f,
816 BackgroundColor = new Color(63, 82, 151),
817 BorderColor = Color.Black
818 };
820 Interface.modsMenu.Append(_deleteModDialog);
822 {
823 TextColor = Color.White,
824 Width = new StyleDimension(-10f, 1f / 3f),
825 Height =
826 {
827 Pixels = 40f
828 },
829 VAlign = 0.85f,
830 HAlign = 0.15f
831 }.WithFadedMouseOver();
832 _dialogYesButton.OnLeftClick += DeleteMod;
835 {
836 TextColor = Color.White,
837 Width = new StyleDimension(-10f, 1f / 3f),
838 Height =
839 {
840 Pixels = 40f
841 },
842 VAlign = 0.85f,
843 HAlign = 0.85f
844 }.WithFadedMouseOver();
845 _dialogNoButton.OnLeftClick += CloseDialog;
847 _dialogText = new UIText(Language.GetTextValue("tModLoader.DeleteModConfirm"))
848 {
849 Width =
850 {
851 Percent = 0.75f
852 },
853 HAlign = 0.5f,
854 VAlign = 0.3f,
855 IsWrapped = true
856 };
858 }
859 else
860 {
862 }
863 }
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< Texture2D >[] Extra
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
void CloseDialog(UIMouseEvent evt, UIElement listeningElement)
Definition UIModItem.cs:865
UIAutoScaleTextTextPanel< string > _dialogNoButton
Definition UIModItem.cs:54
UIAutoScaleTextTextPanel< string > _dialogYesButton
Definition UIModItem.cs:52
void DeleteMod(UIMouseEvent evt, UIElement listeningElement)
Definition UIModItem.cs:872
StyleDimension Height
Definition UIElement.cs:29
void Append(UIElement element)
Definition UIElement.cs:194
StyleDimension Width
Definition UIElement.cs:27
void SetPadding(float pixels)
Definition UIElement.cs:439

References Terraria.ModLoader.UI.UIModItem._blockInput, Terraria.ModLoader.UI.UIModItem._deleteModDialog, Terraria.ModLoader.UI.UIModItem._dialogNoButton, Terraria.ModLoader.UI.UIModItem._dialogText, Terraria.ModLoader.UI.UIModItem._dialogYesButton, Terraria.UI.UIElement.Append(), Terraria.GameContent.UI.Elements.UIPanel.BackgroundColor, Terraria.GameContent.UI.Elements.UIPanel.BorderColor, Terraria.ModLoader.UI.UIModItem.CloseDialog(), Terraria.ModLoader.UI.UIModItem.DeleteMod(), Terraria.GameContent.TextureAssets.Extra, Terraria.Localization.Language.GetTextValue(), Terraria.UI.UIElement.HAlign, Terraria.UI.UIElement.Height, Terraria.Main.keyState, Terraria.ModLoader.UI.Interface.modsMenu, Terraria.Audio.SoundEngine.PlaySound(), Terraria.UI.UIElement.SetPadding(), Terraria.UI.UIElement.VAlign, and Terraria.UI.UIElement.Width.

Referenced by Terraria.ModLoader.UI.UIModItem.OnInitialize().

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