예제 #1
0
 public void disableMod(bool ischecked)
 {
     if (selected_mod.isDisabled != ischecked)
     {
         selected_mod.isDisabled = ischecked;
         if (ischecked)
         {
             selected_mod.OnModDisabled();
             ModConsole.Print(string.Format("Mod <b><color=orange>{0}</color></b> is <color=red><b>Disabled</b></color>", selected_mod.Name));
         }
         else
         {
             selected_mod.OnModEnabled();
             ModConsole.Print(string.Format("Mod <b><color=orange>{0}</color></b> is <color=green><b>Enabled</b></color>", selected_mod.Name));
         }
         ModSettings_menu.SaveSettings(selected_mod);
     }
 }
예제 #2
0
 public void toggleVisibility()
 {
     if (!settingViewContainer.activeSelf)
     {
         CreateList();
         page = 0;
         SetScrollRect();
         setVisibility(!settingViewContainer.activeSelf);
         goBackBtn.SetActive(false);
     }
     else
     {
         if (page == 3)
         {
             ModSettings_menu.SaveSettings(selected);
         }
         setVisibility(!settingViewContainer.activeSelf);
     }
 }
예제 #3
0
 public void toggleVisibility()
 {
     if (!settingViewContainer.activeSelf)
     {
         noOfMods.text = string.Format("<color=orange><b>{0}</b></color> Mods", ModLoader.LoadedMods.Count - 2);
         CreateList();
         page = 0;
         SetScrollRect();
         setVisibility(!settingViewContainer.activeSelf);
         goBackBtn.SetActive(false);
     }
     else
     {
         if (page == 3)
         {
             ModSettings_menu.SaveSettings(selected_mod);
         }
         setVisibility(!settingViewContainer.activeSelf);
     }
 }
예제 #4
0
 public void ToggleVisibility()
 {
     if (!settingViewContainer.activeSelf)
     {
         modCount.text = string.Format("<color=orange><b>{0}</b></color> Mods", ModLoader.LoadedMods.Count - 2);
         CreateList();
         page = 0;
         SetScrollRect();
         SetVisibility(!settingViewContainer.activeSelf);
         backButton.SetActive(false);
     }
     else
     {
         if (page == 3)
         {
             ModSettings_menu.SaveSettings(selectedMod);
             RemoveChildren(settingsList.transform);
         }
         SetVisibility(!settingViewContainer.activeSelf);
     }
 }
예제 #5
0
        public void GoBack()
        {
            Animator anim = settingViewContainer.GetComponent <Animator>();

            switch (page)
            {
            case 1:

                page = 0;
                SetScrollRect();
                CreateList();
                anim.SetBool("goDetails", false);
                backButton.SetActive(false);

                break;

            case 2:

                page = 0;
                SetScrollRect();
                anim.SetBool("goKeybind", false);
                backButton.SetActive(false);

                break;

            case 3:

                page = 0;
                SetScrollRect();
                ModSettings_menu.SaveSettings(selectedMod);
                anim.SetBool("goModSetting", false);
                backButton.SetActive(false);
                RemoveChildren(settingsList.transform);

                break;

            default: break;
            }
        }
예제 #6
0
        public void goBack()
        {
            Animation anim = settingViewContainer.GetComponent <Animation>();

            switch (page)
            {
            case 0:
                //nothing.
                break;

            case 1:
                page = 0;
                SetScrollRect();
                CreateList();
                anim.Play("goBackMod");
                goBackBtn.SetActive(false);
                break;

            case 2:
                page = 0;
                SetScrollRect();
                anim.Play("goBackKeyBinds");
                goBackBtn.SetActive(false);
                break;

            case 3:
                page = 0;
                SetScrollRect();
                ModSettings_menu.SaveSettings(selected_mod);
                anim.Play("goBackSettings");
                goBackBtn.SetActive(false);
                RemoveChildren(modSettingsList.transform);
                selected_mod.ModSettingsClose();
                break;
            }
        }