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

◆ DeleteButtonClick()

void Terraria.ModLoader.UI.UIModPackItem.DeleteButtonClick ( UIMouseEvent evt,
UIElement listeningElement )
inlineprivate

Definition at line 584 of file UIModPackItem.cs.

585 {
587 if (_legacy)
588 {
589 string path = UIModPacks.ModPacksDirectory + Path.DirectorySeparatorChar + modPackItem._filename + ".json";
590 if (File.Exists(path))
591 {
592 File.Delete(path);
593 }
594 }
595 else
596 {
597 string path2 = Path.Combine(UIModPacks.ModPacksDirectory, _filename);
598 if (Directory.Exists(path2))
599 {
600 Directory.Delete(path2, recursive: true);
601 }
602 }
603 Logging.tML.Info((object)("Deleted Mod Pack " + modPackItem._filename));
604 Interface.modPacksMenu.OnDeactivate();
605 Interface.modPacksMenu.OnActivate();
606 }
UIModPackItem(string name, string[] mods, bool legacy, IEnumerable< LocalMod > localMods)

References Terraria.ModLoader.UI.UIModPackItem.UIModPackItem(), Terraria.ModLoader.UI.UIModPackItem._filename, Terraria.ModLoader.UI.UIModPackItem._legacy, Terraria.ModLoader.UI.UIModPacks.ModPacksDirectory, Terraria.ModLoader.UI.Interface.modPacksMenu, and Terraria.ModLoader.Logging.tML.

Referenced by Terraria.ModLoader.UI.UIModPackItem.UIModPackItem().

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