mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 07:17:53 +01:00
Make OnScreen a task.
This commit is contained in:
parent
185be81e73
commit
3f86698615
7 changed files with 157 additions and 151 deletions
|
|
@ -11,8 +11,10 @@ public partial class ModManager
|
|||
|
||||
public event ModPathChangeDelegate ModPathChanged;
|
||||
|
||||
// Rename/Move a mod directory.
|
||||
// Updates all collection settings and sort order settings.
|
||||
/// <summary>
|
||||
/// Rename/Move a mod directory.
|
||||
/// Updates all collection settings and sort order settings.
|
||||
/// </summary>
|
||||
public void MoveModDirectory(int idx, string newName)
|
||||
{
|
||||
var mod = this[idx];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
using Penumbra.UI.Classes;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Penumbra.Mods;
|
||||
|
||||
|
||||
public sealed partial class ModManager
|
||||
{
|
||||
public DirectoryInfo BasePath { get; private set; } = null!;
|
||||
|
|
|
|||
|
|
@ -12,19 +12,15 @@ using Penumbra.Util;
|
|||
|
||||
namespace Penumbra.Mods;
|
||||
|
||||
|
||||
|
||||
public class ModOptionEditor
|
||||
{
|
||||
private readonly CommunicatorService _communicator;
|
||||
private readonly FilenameService _filenames;
|
||||
private readonly SaveService _saveService;
|
||||
|
||||
public ModOptionEditor(CommunicatorService communicator, SaveService saveService, FilenameService filenames)
|
||||
public ModOptionEditor(CommunicatorService communicator, SaveService saveService)
|
||||
{
|
||||
_communicator = communicator;
|
||||
_saveService = saveService;
|
||||
_filenames = filenames;
|
||||
}
|
||||
|
||||
/// <summary> Change the type of a group given by mod and index to type, if possible. </summary>
|
||||
|
|
@ -209,7 +205,7 @@ public class ModOptionEditor
|
|||
/// <summary> Add a new empty option of the given name for the given group. </summary>
|
||||
public void AddOption(Mod mod, int groupIdx, string newName)
|
||||
{
|
||||
var group = mod._groups[groupIdx];
|
||||
var group = mod._groups[groupIdx];
|
||||
var subMod = new SubMod(mod) { Name = newName };
|
||||
subMod.SetPosition(groupIdx, group.Count);
|
||||
switch (group)
|
||||
|
|
@ -319,7 +315,7 @@ public class ModOptionEditor
|
|||
/// <summary> Add additional file redirections to a given option, keeping already existing ones. Only fires an event if anything is actually added.</summary>
|
||||
public void OptionAddFiles(Mod mod, int groupIdx, int optionIdx, Dictionary<Utf8GamePath, FullPath> additions)
|
||||
{
|
||||
var subMod = GetSubMod(mod, groupIdx, optionIdx);
|
||||
var subMod = GetSubMod(mod, groupIdx, optionIdx);
|
||||
var oldCount = subMod.FileData.Count;
|
||||
subMod.FileData.AddFrom(additions);
|
||||
if (oldCount != subMod.FileData.Count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue