Example #1
0
        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);
            }
        }
Example #2
0
 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());
     }
 }
Example #3
0
 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);
 }
Example #4
0
 public static void OpenSavedBodyParts()
 {
     Main.config.Load();
     MenuDialog.SwitchTo(Main.pointMenu);
 }
Example #5
0
 private static void BtnCustomize_Action(string id, Dialog dialog)
 {
     config.Load();
     MenuDialog.SwitchTo(UIMenu.Menu, dialog.hand(), dialog.tabName);
 }