Пример #1
0
        public static void SaveCurrentConfig()
        {
            if (!currentInterface.Configuable())
            {
                return;
            }
            Dictionary <string, string> newConfig = currentInterface.GrabConfig();

            currentInterface.SaveConfig(newConfig);
        }
Пример #2
0
        /// <summary>
        /// Call this manually if you really need to. This is what Save Button does.
        /// </summary>
        /// <param name="silent">Whether to hide indication or not</param>
        public static void SaveCurrentConfig(bool silent = false)
        {
            if (!currentInterface.Configuable())
            {
                return;
            }
            Dictionary <string, string> newConfig = currentInterface.GrabConfig();

            if (!currentInterface.SaveConfig(newConfig))
            {
                alert = InternalTranslator.Translate("<ModID> had an issue with saving its configuration").Replace("<ModID>", currentInterface.rwMod.ModID);
            }
            else if (!silent)
            {
                alert = InternalTranslator.Translate("<ModID> has saved its configuration").Replace("<ModID>", currentInterface.rwMod.ModID);
            }
        }
Пример #3
0
        public void ChangeSelectedMod()
        {
            //Unload Current Ones

            currentInterface = OptionScript.loadedInterfaceDict[modList[selectedModIndex]];
            selectedTabIndex = 0;
            tabCtrler.OnChange();
            ChangeSelectedTab();
            if (currentInterface.Configuable())
            {
                saveButton.buttonBehav.greyedOut  = false;
                resetButton.buttonBehav.greyedOut = false;
            }
            else
            {
                saveButton.buttonBehav.greyedOut  = true;
                resetButton.buttonBehav.greyedOut = true;
            }
        }