private static void AMsubMenu() { CustomSubMenu.AddToggle("FLux Enabled", !Main.fluxObj?.Equals(null) ?? false, (action) => { Main.ToggleObject(); }, null); CustomSubMenu.AddRadialPuppet("HDRClamp", f => Main.flux_HDRClamp.Value = f, Main.flux_HDRClamp.Value, HDR); CustomSubMenu.AddRadialPuppet("Hue", f => Main.flux_Hue.Value = f, Main.flux_Hue.Value, Hue); CustomSubMenu.AddRadialPuppet("Colorize", f => Main.flux_Colorize.Value = f, Main.flux_Colorize.Value, Colorize); CustomSubMenu.AddRadialPuppet("Brightness", f => Main.flux_Brightness.Value = f, Main.flux_Brightness.Value, Bright); CustomSubMenu.AddRadialPuppet("Desat", f => Main.flux_Desat.Value = f, Main.flux_Desat.Value, Desat); StoredMenu(); CustomSubMenu.AddSubMenu("Extras", () => { CustomSubMenu.AddSubMenu($"\nReset", () => { CustomSubMenu.AddButton($"\n<size=30>Confirm Reset</size>", () => { Main.pauseOnValueChange = true; Main.flux_HDRClamp.Value = .222f; Main.flux_Hue.Value = .102f; Main.flux_Colorize.Value = .75f; Main.flux_Brightness.Value = .623f; Main.flux_Desat.Value = .255f; Main.pauseOnValueChange = false; Main.OnValueChange(0f, 0f); }, checkmark); }, reset); CustomSubMenu.AddButton($"*Rotary puppets max out at 97%\n*Slot names can be changed in Mod Settings", () => { }, null); CustomSubMenu.AddButton($"Uses:\nVRChat Flux Bloom Removal Shader\nrollthered.\nbooth.pm", () => { }, null); }, gears); }
private static void VibrateRadial(Toy toy, string text = "") { CustomSubMenu.AddRadialPuppet(text, f => { int roundedPercent = (int)Math.Round(f * 100); toy.setSpeed(roundedPercent / (100 / toy.maxSpeed)); //0-10 }, ((float)toy.lastSpeed) / toy.maxSpeed, toy.GetTexture()); }
private static void EdgeRadials(Toy toy) { VibrateRadial(toy, toy.name + " 2"); CustomSubMenu.AddRadialPuppet(toy.name + " 1", f => { int roundedPercent = (int)Math.Round(f * 100); toy.setEdgeSpeed(roundedPercent / (100 / toy.maxSpeed2)); //0-10 }, ((float)toy.lastEdgeSpeed) / toy.maxSpeed2, toy.GetTexture()); }
private static void MaxRadials(Toy toy) { VibrateRadial(toy, toy.name + " Vibration"); CustomSubMenu.AddRadialPuppet($"{toy.name} Contraction", f => { int contractionLevel = (int)Math.Round(f * 100) / (100 / toy.maxLinear); if (toy.lastContraction != contractionLevel) { toy.setContraction(contractionLevel); } }, ((float)toy.lastSpeed / toy.maxSpeed), toy.GetTexture()); }
public static PedalOption AddRadialPedalToSubMenu(string text, Action <float> onUpdate, float startingValue = 0, Texture2D icon = null) { return(CustomSubMenu.AddRadialPuppet(text, onUpdate, startingValue, icon)); }