private static void SetupButtonsForAMAPI() { VRCActionMenuPage.AddSubMenu(ActionMenuPage.Options, "SOS", () => { //Respawn if (ModSettings.confirmRespawn) { CustomSubMenu.AddSubMenu("Respawn", () => CustomSubMenu.AddButton("Confirm Respawn", Utils.Respawn, respawnIcon), respawnIcon ); } else { CustomSubMenu.AddButton("Respawn", Utils.Respawn, respawnIcon); } //Reset Avatar if (ModSettings.confirmAvatarReset) { CustomSubMenu.AddSubMenu("Reset Avatar", () => CustomSubMenu.AddButton("Confirm Reset Avatar", Utils.ResetAvatar, resetAvatarIcon), resetAvatarIcon ); } else { CustomSubMenu.AddButton("Reset Avatar", Utils.ResetAvatar, resetAvatarIcon); } //Instance Rejoin if (ModSettings.confirmInstanceRejoin) { CustomSubMenu.AddSubMenu("Rejoin Instance", () => CustomSubMenu.AddButton("Confirm Instance Rejoin", Utils.RejoinInstance, rejoinInstanceIcon), rejoinInstanceIcon ); } else { CustomSubMenu.AddButton("Rejoin Instance", Utils.RejoinInstance, rejoinInstanceIcon); } //Go Home if (ModSettings.confirmGoHome) { CustomSubMenu.AddSubMenu("Go Home", () => CustomSubMenu.AddButton("Confirm Go Home", Utils.Home, goHomeIcon), goHomeIcon ); } else { CustomSubMenu.AddButton("Go Home", Utils.Home, goHomeIcon); } }, helpIcon ); }
public static void AddFourAxisPedalToMenu(ActionMenuPageType pageType, string text, Action <Vector2> onUpdate, Texture2D icon = null, Insertion insertion = Insertion.Post, string topButtonText = "Up", string rightButtonText = "Right", string downButtonText = "Down", string leftButtonText = "Left") { VRCActionMenuPage.AddPedalToList((ActionMenuPage)pageType, new PedalFourAxis(text, icon, onUpdate, topButtonText, rightButtonText, downButtonText, leftButtonText), insertion); }
public static void InitUi() { loadAssets(); if (NearClipPlaneAdjMod.amapi_ModsFolder.Value) { AMUtils.AddToModsFolder("<color=#ff00ff>NearClip Plane Adj</color>", () => AMsubMenu(), plane); } else { VRCActionMenuPage.AddSubMenu(ActionMenuPage.Options, "<color=#ff00ff>NearClip Plane Adj</color>", () => AMsubMenu(), plane); } }
public static void InitUi() { loadAssets(); if (Main.amapi_ModsFolder.Value) { AMUtils.AddToModsFolder("<color=#ff00ff>Portable Mirror</color>", () => AMsubMenu(), MirrorOpt); } else { VRCActionMenuPage.AddSubMenu(ActionMenuPage.Main, "<color=#ff00ff>Portable Mirror</color>", () => AMsubMenu(), MirrorOpt); } }
public static void ActionMenuIntegration() { VRCActionMenuPage.AddSubMenu(ActionMenuPage.Main, "<color=#00a2ff>Tracking Rotator</color>", () => { CustomSubMenu.AddButton("Forward", () => Move(Main.Transform.right), Assets.Forward); //X+ CustomSubMenu.AddButton("Backward", () => Move(-Main.Transform.right), Assets.Backward); //X- CustomSubMenu.AddButton("Tilt Left", () => Move(Main.Transform.forward), Assets.TLeft); //Z+ CustomSubMenu.AddButton("Tilt Right", () => Move(-Main.Transform.forward), Assets.TRight); //Z- CustomSubMenu.AddButton("Left", () => Move(-Main.Transform.up), Assets.Left); //Y- CustomSubMenu.AddButton("Right", () => Move(Main.Transform.up), Assets.Right); //Y+ CustomSubMenu.AddSubMenu("Other", () => { CustomSubMenu.AddButton("Reset", () => CameraTransform.localRotation = OriginalRotation, Assets.Reset); CustomSubMenu.AddToggle("High precision", HighPrecision, b => HighPrecision = b, Assets.Hp); }, Assets.Other); }, Assets.Main); }
public static void InitUi() { loadAssets(); InitTextures(); switch (Main.amapi_ModsFolder.Value) { case "ModsFolder": AMUtils.AddToModsFolder("<color=#ff00ff>FLux</color>", () => AMsubMenu(), Base); break; case "Options": VRCActionMenuPage.AddSubMenu(ActionMenuPage.Options, "<color=#ff00ff>FLux</color>", () => AMsubMenu(), Base); break; case "Main": VRCActionMenuPage.AddSubMenu(ActionMenuPage.Main, "<color=#ff00ff>FLux</color>", () => AMsubMenu(), Base); break; case "Expression": VRCActionMenuPage.AddSubMenu(ActionMenuPage.Expression, "<color=#ff00ff>FLux</color>", () => AMsubMenu(), Base); break; default: VRCActionMenuPage.AddSubMenu(ActionMenuPage.Options, "<color=#ff00ff>FLux</color>", () => AMsubMenu(), Base); break; } }
private static void SetupButtons() { VRCActionMenuPage.AddSubMenu(ActionMenuPage.Main, "Vibrator Controller", delegate { foreach (Toy toy in Toy.allToys) { try { if (toy.isActive && toy.hand != Hand.shared) { ToysMenu(toy); } } catch (Exception e) { MelonLogger.Warning($"Error with toy {toy.name}: " + e.Message); } } }, VibratorController.logo); }
public static void AddTogglePedalToMenu(ActionMenuPageType pageType, string text, bool startingState, Action <bool> onToggle, Texture2D icon = null, Insertion insertion = Insertion.Post) { VRCActionMenuPage.AddPedalToList((ActionMenuPage)pageType, new PedalToggle(text, onToggle, startingState, icon), insertion); }
public static void AddSubMenuToMenu(ActionMenuPageType pageType, string text, Action openFunc, Texture2D icon = null, Action closeFunc = null, Insertion insertion = Insertion.Post) { VRCActionMenuPage.AddPedalToList((ActionMenuPage)pageType, new PedalSubMenu(openFunc, text, icon, closeFunc), insertion); }
public static void AddRadialPedalToMenu(ActionMenuPageType pageType, string text, Action <float> onUpdate, float startingValue = 0, Texture2D icon = null, Insertion insertion = Insertion.Post) { VRCActionMenuPage.AddPedalToList((ActionMenuPage)pageType, new PedalRadial(text, startingValue, icon, onUpdate), insertion); }
public static void AddButtonPedalToMenu(ActionMenuPageType pageType, string text, Action triggerEvent, Texture2D icon = null, Insertion insertion = Insertion.Post) { VRCActionMenuPage.AddPedalToList((ActionMenuPage)pageType, new PedalButton(text, icon, triggerEvent), insertion); }