/// <summary> /// Shows a mod options dialog now, as if Options was used inside the Mods menu. /// </summary> /// <param name="optionsType">The type of the options to show.</param> /// <param name="title">The title to show in the dialog.</param> /// <param name="onClose">The method to call when the dialog is closed.</param> private static void ShowDialog(Type optionsType, string title, Action <object> onClose) { var handler = new RuntimeOptionsHandler(GetModDir(optionsType.Assembly), title) { OnClose = onClose }; new OptionsDialog(optionsType, handler).OnModOptions(null); }
/// <summary> /// Shows a mod options dialog now, as if Options was used inside the Mods menu. /// </summary> /// <param name="optionsType">The type of the options to show.</param> /// <param name="title">The title to show in the dialog.</param> /// <param name="onClose">The method to call when the dialog is closed.</param> private static void ShowDialog(Type optionsType, string title, Action <object> onClose) { var handler = new RuntimeOptionsHandler(Path.GetDirectoryName(optionsType.Assembly. Location), title) { OnClose = onClose }; new OptionsDialog(optionsType, handler).OnModOptions(null); }