/// <summary> /// Shows a radiobutton list dialog with an optional title, optional icon, a required scrollable radiobutton list, a required button, and an optional button. /// <para></para> /// For more customizability, use <see cref="CreateRadioList"/>. /// </summary> /// <param name="options">The strings to use for the list item labels.</param> /// <param name="onAffirmativeButtonClicked">Called when the affirmative button is clicked.</param> /// <param name="affirmativeButtonText">The affirmative button text.</param> /// <param name="titleText">The title text. Make null for no title.</param> /// <param name="icon">The icon next to the title. Make null for no icon.</param> /// <param name="onDismissiveButtonClicked">Called when the dismissive button is clicked.</param> /// <param name="dismissiveButtonText">The dismissive button text. Make null for no dismissive button.</param> /// <param name="selectedIndexStart">The index of the option that will be selected when the dialog is shown.</param> /// <returns>The instance of the initialized, shown dialog.</returns> public static DialogRadioList ShowRadioList(string[] options, Action <int> onAffirmativeButtonClicked, string affirmativeButtonText, string titleText, ImageData icon, Action onDismissiveButtonClicked, string dismissiveButtonText, int selectedIndexStart = 0) { DialogRadioList dialog = CreateRadioList(); dialog.Initialize(options, onAffirmativeButtonClicked, affirmativeButtonText, titleText, icon, onDismissiveButtonClicked, dismissiveButtonText, selectedIndexStart); dialog.Show(); return(dialog); }
/// <summary> /// Shows an simple list dialog with an optional title, optional icon, and a required scrollable option list. /// <para></para> /// For more customizability, use <see cref="CreateSimpleList"/>. /// </summary> /// <param name="optionDataList">The data to use for the option list.</param> /// <param name="onItemClick">Called when an option is selected.</param> /// <param name="titleText">The title text. Make null for no title.</param> /// <param name="icon">The icon next to the title. Make null for no icon.</param> /// <returns>The instance of the initialized, shown dialog.</returns> public DialogRadioList ShowSimpleList(OptionData[] options, Action <int> onItemClick, string titleText, ImageData icon) { DialogRadioList dialog = CreateSimpleList(); dialog.Initialize(options, onItemClick, null, titleText, icon, null, null, -1, true); dialog.Show(); return(dialog); }