Example #1
0
        public static FloatMenuOption SavedModListOption(ModList list)
        {
            var options = Utilities.NewOptions;

            options.Add(new FloatMenuOption(I18n.LoadModList, () => list.Apply(false)));
            options.Add(new FloatMenuOption(I18n.AddModList, () => list.Apply(true)));
            options.Add(new FloatMenuOption(I18n.RenameModList, () => Find.WindowStack.Add(new Dialog_Rename_ModList(list))));
            options.Add(new FloatMenuOption(I18n.ChangeListColour, () => Find.WindowStack.Add(new Dialog_ColourPicker(list.Color, color => list.Color = color))));
            options.Add(new FloatMenuOption(I18n.DeleteModList, () => TryDelete(list)));
            return(new FloatMenuOption(list.Name, () => Utilities.FloatMenu(options)));
        }
        public static FloatMenuOption SavedModListOption(ModList list)
        {
            var options = Utilities.NewOptionsList;

            options.Add(new FloatMenuOption(I18n.ExportModList, () => { GUIUtility.systemCopyBuffer = list.ToYaml(); Messages.Message(I18n.ModListCopiedToClipboard(list.Name), MessageTypeDefOf.TaskCompletion, false); }));
            options.Add(new FloatMenuOption(I18n.LoadModList, () => list.Apply(false)));
            options.Add(new FloatMenuOption(I18n.AddModList, () => list.Apply(true)));
            options.Add(new FloatMenuOption(I18n.RenameModList, () => Find.WindowStack.Add(new Dialog_Rename_ModList(list))));
            options.Add(new FloatMenuOption(I18n.ChangeListColour, () => Find.WindowStack.Add(new Dialog_ColourPicker(list.Color, color => list.Color = color))));
            options.Add(new FloatMenuOption(I18n.DeleteModList, () => TryDelete(list)));
            return(new FloatMenuOption(list.Name, () => Utilities.FloatMenu(options)));
        }