public override void OnClick(string contextName, string contextId, bool state, GameObject thisButton) { base.OnClick(contextName, contextId, state, thisButton); bool exitDialog = false; switch (contextName) { case "confirm": Main.config.FundamentTID = par.thingID; Main.config.Save(); Managers.soundManager.Play("success", transform, 0.2f); exitDialog = true; break; case "confirmCollision": Main.config.Dynamic = true; Main.config.Save(); Managers.soundManager.Play("success", transform, 0.2f); exitDialog = true; break; case "back": exitDialog = true; break; } if (exitDialog) { MenuDialog.SwitchTo(UIMenu.Menu, hand, tabName); } }
public static void Postfix(MainDialog __instance, string contextName, string contextId, bool state, GameObject thisButton) { if (contextName.Equals("modMenu")) { ModMenu.Menu.SetBackButton(DialogType.Main); MenuDialog.SwitchTo(ModMenu.Menu, __instance.hand()); } }
private static void btnResetBackground_Action(string id, Dialog dialog) { Main.config.HideFundament = false; Main.config.FundamentTID = ""; Main.config.Dynamic = false; Main.config.Save(); Managers.soundManager.Play("success", dialog.transform, 0.2f); MenuDialog.SwitchTo(ModMenu.Menu, dialog.hand(), dialog.tabName); }
public static void OpenSavedBodyParts() { Main.config.Load(); MenuDialog.SwitchTo(Main.pointMenu); }
private static void BtnCustomize_Action(string id, Dialog dialog) { config.Load(); MenuDialog.SwitchTo(UIMenu.Menu, dialog.hand(), dialog.tabName); }