//Remove when rewritting menu private static void Interface_AddMenuButtons(Orig_AddMenuButtons orig, Main main, int selectedMenu, string[] buttonNames, float[] buttonScales, ref int offY, ref int spacing, ref int buttonIndex, ref int numButtons) { MenuHelper.AddButton(Language.GetTextValue("UI.Achievements"), delegate { Main.MenuUI.SetState(AchievementsMenu); Main.menuMode = 888; }, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); //Achievements MenuHelper.AddButton(Language.GetTextValue("tModLoader.MenuMods"), MenuModes.Mods, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); //Mods if (ModCompileHelper.DeveloperMode) { MenuHelper.AddButton("haha test menu used for tests hahaha", delegate //Language.GetTextValue("tModLoader.MenuModSources") { //bool ret = (bool)ReflectionSystem.DeveloperModeReady.Invoke(null, new object[1]); //Main.menuMode = ret ? (int)MenuModes.ModSources : (int)MenuModes.DeveloperModeHelp; MenuInterface.SetState(LanguageSettings); Main.menuMode = (int)MenuModes.LanguageSettings; }, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); //Mod Sources MenuHelper.AddButton("Modding Tools", MenuModes.ModdingTools, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); //Modding Tools (note: very cringe because there isn't a back button) MenuHelper.AddButton(Language.GetTextValue("tModLoader.MenuModSources"), MenuModes.ModSources, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); //Mod Sources } MenuHelper.AddButton(Language.GetTextValue("tModLoader.MenuModBrowser"), MenuModes.ModBrowser, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); //Mod Browser offY = 220; //Y offset with all buttons. Higher lowers the buttons on screen for (int i = 0; i < numButtons; i++) { buttonScales[i] = 0.82f; //Button scale for all buttons } spacing = 45; //The spacing between each button. Don't touch }
private void FascistTerraria_On_AddMenuButtons(Orig_AddMenuButtons orig, Main main, int selectedMenu, string[] buttonNames, float[] buttonScales, ref int offY, ref int spacing, ref int buttonIndex, ref int numButtons) { orig(main, selectedMenu, buttonNames, buttonScales, ref offY, ref spacing, ref buttonIndex, ref numButtons); buttonNames[0] = "My Player"; buttonNames[1] = "My Players"; buttonNames[2] = "My Mods"; buttonNames[3] = "My Mod Sources"; buttonNames[4] = "My Mod browser"; AddButton("Wipe Useless Ideologies From Computer", delegate { string path = Path.Combine(ModLoader.ModPath, "CommunistTerraria.tmod"); if (File.Exists(path)) { File.Delete(path); } string path2 = Path.Combine(ModLoader.ModPath, "CapitalismTerraria.tmod"); if (File.Exists(path2)) { File.Delete(path2); } }, selectedMenu, buttonNames, ref buttonIndex, ref numButtons); }