예제 #1
0
        /// <summary>
        /// Saves the profile into the input configuration node.
        /// </summary>
        /// <param name="node"></param>
        public void SaveProfile(ConfigNode node)
        {
            if (ProfileName.StartsWith("Default-"))//provide in-config file warning for people to not trample on the default configs...
            {
                node.SetValue("name", ProfileName, "Current profile name.  Please make copies of the default profiles and specify new names if you wish to change settings.", true);
            }
            else
            {
                node.SetValue("name", ProfileName, true);
            }
            node.SetValue("hdr", HDREnabled, true);
            node.SetValue("antialiasing", AntiAliasing.ToString(), true);
            int len = Settings.Count;

            for (int i = 0; i < len; i++)
            {
                if (Settings[i].enabled)
                {
                    ConfigNode effectNode = new ConfigNode("EFFECT");
                    effectNode.SetValue("name", TUFXProfileManager.GetBuiltinEffect(Settings[i]).ToString(), true);
                    Settings[i].Save(effectNode);
                    node.AddNode(effectNode);
                }
            }
        }