internal void CatBatchRemove(RegisterSubCategoriesEvent ev, MakerCategory category) { ev.AddControl(new MakerText("Batch remove accessory slots", category, this)); MakerTextbox StartTextbox = ev.AddControl(new MakerTextbox(category, "Start", "", this)); MakerTextbox EndTextbox = ev.AddControl(new MakerTextbox(category, "End", "", this)); MakerRadioButtons tglMode = ev.AddControl(new MakerRadioButtons(category, this, "Mode", "All", "Hair", "Item")); MakerButton btnRmApply = ev.AddControl(new MakerButton("Go", category, this)); btnRmApply.OnClick.AddListener(delegate { if (!int.TryParse(StartTextbox.Value, out int start)) { StartTextbox.Value = ""; start = 0; } if (!int.TryParse(EndTextbox.Value, out int end)) { EndTextbox.Value = ""; end = 0; } ActBatchRemove(start - 1, end - 1, tglMode.Value); });
private void MakerAPI_RegisterCustomSubCategories(object sender, RegisterSubCategoriesEvent e) { MakerCategory category = new MakerCategory(MakerConstants.Parameter.ADK.CategoryName, "Profile"); e.AddSubCategory(category); e.AddControl(new MakerText("Character Description", category, this)); ProfileTextbox = e.AddControl(new MakerTextbox(category, "", "", this)); //Starts throwing errors at some point after 30,000 characters ProfileTextbox.CharacterLimit = 30000; }
internal static void MakerAPI_RegisterCustomSubCategories(object sender, RegisterSubCategoriesEvent ev) { MakerCategory category = new MakerCategory("03_ClothesTop", "tglSettings", MakerConstants.Clothes.Copy.Position + 1, "Settings"); var addRemoveText = new MakerText("Add or remove outfit slots", category, Instance); ev.AddControl(addRemoveText); var coordinateNameTextbox = new MakerTextbox(category, "Outfit Name", TextboxDefault, Instance); ev.AddControl(coordinateNameTextbox); var addCoordinateButton = new MakerButton("Add additional clothing slot", category, Instance); ev.AddControl(addCoordinateButton); addCoordinateButton.OnClick.AddListener(() => { var chaControl = MakerAPI.GetCharacterControl(); SetCoordinateName(chaControl, chaControl.chaFile.coordinate.Length, coordinateNameTextbox.Value); AddCoordinateSlot(chaControl); }); var removeCoordinateButton = new MakerButton("Remove last additional clothing slot", category, Instance); ev.AddControl(removeCoordinateButton); removeCoordinateButton.OnClick.AddListener(() => { RemoveCoordinateSlot(MakerAPI.GetCharacterControl()); }); RenameCoordinateText = new MakerText("Rename outfit slots", category, Instance); ev.AddControl(RenameCoordinateText); RenameCoordinateDropdown = new MakerDropdown("Outfit", new string[] { "none" }, category, 0, Instance); ev.AddControl(RenameCoordinateDropdown); RenameCoordinateTextbox = new MakerTextbox(category, "New Name", TextboxDefault, Instance); RenameCoordinateTextbox.ValueChanged.Subscribe(value => { if (value != TextboxDefault) { var chaControl = MakerAPI.GetCharacterControl(); SetCoordinateName(chaControl, OriginalCoordinateLength + RenameCoordinateDropdown.Value, RenameCoordinateTextbox.Value); UpdateMakerUI(); } }); ev.AddControl(RenameCoordinateTextbox); ev.AddSubCategory(category); }
private void MakerAPI_MakerExiting(object sender, System.EventArgs e) { ProfileTextbox = null; }