/// <summary>Add a numeric field to the form.</summary>
        /// <param name="label">The label text.</param>
        /// <param name="description">A description shown on hover, if any.</param>
        /// <param name="get">Get the current value.</param>
        /// <param name="set">Set a new value.</param>
        /// <param name="min">The minimum value.</param>
        /// <param name="max">The maximum value.</param>
        /// <param name="enable">Whether the field is enabled.</param>
        public GenericModConfigMenuIntegration <TConfig> AddNumberField(string label, string description, Func <TConfig, int> get, Action <TConfig, int> set, int min, int max, bool enable = true)
        {
            AssertLoaded();

            if (enable)
            {
                ModApi.RegisterClampedOption(
                    mod: ConsumerManifest,
                    optionName: label,
                    optionDesc: description,
                    optionGet: () => get(GetConfig()),
                    optionSet: val => set(GetConfig(), val),
                    min: min,
                    max: max
                    );
            }

            return(this);
        }
 private static void AddIntSlider(string name, string desc, Func <int> get, Action <int> set, int min, int max)
 {
     api.RegisterClampedOption(Globals.Manifest, name, desc, get, set, min, max);
 }