mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 06:17:45 +01:00
Update some Dalamud Services.
This commit is contained in:
parent
09ca32f33d
commit
af536b3423
24 changed files with 78 additions and 91 deletions
|
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Internal.Notifications;
|
||||
using Dalamud.Plugin.Services;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
|
|
@ -21,10 +21,10 @@ namespace Penumbra.UI.AdvancedWindow;
|
|||
public class FileEditor<T> where T : class, IWritable
|
||||
{
|
||||
private readonly FileDialogService _fileDialog;
|
||||
private readonly DataManager _gameData;
|
||||
private readonly IDataManager _gameData;
|
||||
private readonly ModEditWindow _owner;
|
||||
|
||||
public FileEditor(ModEditWindow owner, DataManager gameData, Configuration config, FileDialogService fileDialog, string tabName,
|
||||
public FileEditor(ModEditWindow owner, IDataManager gameData, Configuration config, FileDialogService fileDialog, string tabName,
|
||||
string fileType, Func<IReadOnlyList<FileRegistry>> getFiles, Func<T, bool, bool> drawEdit, Func<string> getInitialPath,
|
||||
Func<byte[], T?> parseFile)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin.Services;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
|
|
@ -518,7 +518,7 @@ public partial class ModEditWindow : Window, IDisposable
|
|||
return new FullPath(path);
|
||||
}
|
||||
|
||||
public ModEditWindow(PerformanceTracker performance, FileDialogService fileDialog, ItemSwapTab itemSwapTab, DataManager gameData,
|
||||
public ModEditWindow(PerformanceTracker performance, FileDialogService fileDialog, ItemSwapTab itemSwapTab, IDataManager gameData,
|
||||
Configuration config, ModEditor editor, ResourceTreeFactory resourceTreeFactory, MetaFileManager metaFileManager,
|
||||
StainService stainService, ActiveCollections activeCollections, UiBuilder uiBuilder, DalamudServices dalamud, ModMergeTab modMergeTab,
|
||||
CommunicatorService communicator, TextureManager textures)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Dalamud.Utility;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||
using ImGuiNET;
|
||||
|
|
@ -54,10 +54,10 @@ public class ChangedItemDrawer : IDisposable
|
|||
private readonly Dictionary<ChangedItemIcon, TextureWrap> _icons = new(16);
|
||||
private float _smallestIconWidth;
|
||||
|
||||
public ChangedItemDrawer(UiBuilder uiBuilder, DataManager gameData, CommunicatorService communicator, Configuration config)
|
||||
public ChangedItemDrawer(UiBuilder uiBuilder, IDataManager gameData, ITextureProvider textureProvider, CommunicatorService communicator, Configuration config)
|
||||
{
|
||||
_items = gameData.GetExcelSheet<Item>()!;
|
||||
uiBuilder.RunWhenUiPrepared(() => CreateEquipSlotIcons(uiBuilder, gameData), true);
|
||||
uiBuilder.RunWhenUiPrepared(() => CreateEquipSlotIcons(uiBuilder, gameData, textureProvider), true);
|
||||
_communicator = communicator;
|
||||
_config = config;
|
||||
}
|
||||
|
|
@ -321,7 +321,7 @@ public class ChangedItemDrawer : IDisposable
|
|||
};
|
||||
|
||||
/// <summary> Initialize the icons. </summary>
|
||||
private bool CreateEquipSlotIcons(UiBuilder uiBuilder, DataManager gameData)
|
||||
private bool CreateEquipSlotIcons(UiBuilder uiBuilder, IDataManager gameData, ITextureProvider textureProvider)
|
||||
{
|
||||
using var equipTypeIcons = uiBuilder.LoadUld("ui/uld/ArmouryBoard.uld");
|
||||
|
||||
|
|
@ -345,11 +345,11 @@ public class ChangedItemDrawer : IDisposable
|
|||
Add(ChangedItemIcon.Neck, equipTypeIcons.LoadTexturePart("ui/uld/ArmouryBoard_hr1.tex", 9));
|
||||
Add(ChangedItemIcon.Wrists, equipTypeIcons.LoadTexturePart("ui/uld/ArmouryBoard_hr1.tex", 10));
|
||||
Add(ChangedItemIcon.Finger, equipTypeIcons.LoadTexturePart("ui/uld/ArmouryBoard_hr1.tex", 11));
|
||||
Add(ChangedItemIcon.Monster, gameData.GetImGuiTexture("ui/icon/062000/062042_hr1.tex"));
|
||||
Add(ChangedItemIcon.Demihuman, gameData.GetImGuiTexture("ui/icon/062000/062041_hr1.tex"));
|
||||
Add(ChangedItemIcon.Customization, gameData.GetImGuiTexture("ui/icon/062000/062043_hr1.tex"));
|
||||
Add(ChangedItemIcon.Action, gameData.GetImGuiTexture("ui/icon/062000/062001_hr1.tex"));
|
||||
Add(AllFlags, gameData.GetImGuiTexture("ui/icon/114000/114052_hr1.tex"));
|
||||
Add(ChangedItemIcon.Monster, textureProvider.GetTextureFromGame("ui/icon/062000/062042_hr1.tex", true));
|
||||
Add(ChangedItemIcon.Demihuman, textureProvider.GetTextureFromGame("ui/icon/062000/062041_hr1.tex", true));
|
||||
Add(ChangedItemIcon.Customization, textureProvider.GetTextureFromGame("ui/icon/062000/062043_hr1.tex", true));
|
||||
Add(ChangedItemIcon.Action, textureProvider.GetTextureFromGame("ui/icon/062000/062001_hr1.tex", true));
|
||||
Add(AllFlags, textureProvider.GetTextureFromGame("ui/icon/114000/114052_hr1.tex", true));
|
||||
|
||||
var unk = gameData.GetFile<TexFile>("ui/uld/levelup2_hr1.tex");
|
||||
if (unk == null)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public sealed class CollectionPanel : IDisposable
|
|||
private readonly ActiveCollections _active;
|
||||
private readonly CollectionSelector _selector;
|
||||
private readonly ActorService _actors;
|
||||
private readonly TargetManager _targets;
|
||||
private readonly ITargetManager _targets;
|
||||
private readonly IndividualAssignmentUi _individualAssignmentUi;
|
||||
private readonly InheritanceUi _inheritanceUi;
|
||||
private readonly ModStorage _mods;
|
||||
|
|
@ -40,7 +40,7 @@ public sealed class CollectionPanel : IDisposable
|
|||
private int _draggedIndividualAssignment = -1;
|
||||
|
||||
public CollectionPanel(DalamudPluginInterface pi, CommunicatorService communicator, CollectionManager manager,
|
||||
CollectionSelector selector, ActorService actors, TargetManager targets, ModStorage mods)
|
||||
CollectionSelector selector, ActorService actors, ITargetManager targets, ModStorage mods)
|
||||
{
|
||||
_collections = manager.Storage;
|
||||
_active = manager.Active;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class CollectionsTab : IDisposable, ITab
|
|||
}
|
||||
|
||||
public CollectionsTab(DalamudPluginInterface pi, Configuration configuration, CommunicatorService communicator,
|
||||
CollectionManager collectionManager, ModStorage modStorage, ActorService actors, TargetManager targets, TutorialService tutorial)
|
||||
CollectionManager collectionManager, ModStorage modStorage, ActorService actors, ITargetManager targets, TutorialService tutorial)
|
||||
{
|
||||
_config = configuration;
|
||||
_tutorial = tutorial;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ using Penumbra.UI.Classes;
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Plugin.Services;
|
||||
using OtterGui.Widgets;
|
||||
using Penumbra.Api.Enums;
|
||||
using Penumbra.Interop.Services;
|
||||
|
|
@ -27,11 +27,11 @@ public class ModsTab : ITab
|
|||
private readonly ActiveCollections _activeCollections;
|
||||
private readonly RedrawService _redrawService;
|
||||
private readonly Configuration _config;
|
||||
private readonly ClientState _clientState;
|
||||
private readonly IClientState _clientState;
|
||||
private readonly CollectionSelectHeader _collectionHeader;
|
||||
|
||||
public ModsTab(ModManager modManager, CollectionManager collectionManager, ModFileSystemSelector selector, ModPanel panel,
|
||||
TutorialService tutorial, RedrawService redrawService, Configuration config, ClientState clientState,
|
||||
TutorialService tutorial, RedrawService redrawService, Configuration config, IClientState clientState,
|
||||
CollectionSelectHeader collectionHeader)
|
||||
{
|
||||
_modManager = modManager;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Interface;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Resource;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Resource.Handle;
|
||||
using FFXIVClientStructs.Interop;
|
||||
|
|
@ -20,9 +19,9 @@ public class ResourceTab : ITab
|
|||
{
|
||||
private readonly Configuration _config;
|
||||
private readonly ResourceManagerService _resourceManager;
|
||||
private readonly SigScanner _sigScanner;
|
||||
private readonly ISigScanner _sigScanner;
|
||||
|
||||
public ResourceTab(Configuration config, ResourceManagerService resourceManager, SigScanner sigScanner)
|
||||
public ResourceTab(Configuration config, ResourceManagerService resourceManager, ISigScanner sigScanner)
|
||||
{
|
||||
_config = config;
|
||||
_resourceManager = resourceManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue