/// <summary> /// Initializes a new instance of the <see cref="T:StardewConfigFramework.ModOptionSelection"/> class. /// </summary> /// <param name="labelText">Label text.</param> /// <param name="identifier">Identifier.</param> /// <param name="choices">Choices. Must contain at least one choice.</param> /// <param name="defaultSelection">Default selection.</param> /// <param name="enabled">If set to <c>true</c> enabled.</param> public ModOptionSelection(string identifier, string labelText, ModSelectionOptionChoices choices = null, int defaultSelection = 0, bool enabled = true) : base(identifier, labelText, enabled) { if (choices != null) { this.Choices = choices; this.SelectionIndex = defaultSelection; } }
public ModOptionSelection(string identifier, string labelText, ModSelectionOptionChoices choices, string defaultSelection, bool enabled = true) : base(identifier, labelText, enabled) { if (choices != null) { this.Choices = choices; if (choices.Count > 0) { this.Selection = defaultSelection; } } }