mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 13:27:43 +01:00
Merge branch 'master' into ImRaii-Widgets
This commit is contained in:
commit
156abbdcbe
300 changed files with 1060 additions and 1068 deletions
|
|
@ -8,7 +8,7 @@ internal class AddonInspectorWidget : IDataWindowWidget
|
|||
private UiDebug? addonInspector;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "ai", "addoninspector" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["ai", "addoninspector"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Addon Inspector";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class AddonLifecycleWidget : IDataWindowWidget
|
|||
public string DisplayName { get; init; } = "Addon Lifecycle";
|
||||
|
||||
/// <inheritdoc/>
|
||||
[MemberNotNullWhen(true, "AddonLifecycle")]
|
||||
[MemberNotNullWhen(true, nameof(AddonLifecycle))]
|
||||
public bool Ready { get; set; }
|
||||
|
||||
private AddonLifecycle? AddonLifecycle { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game;
|
||||
|
|
@ -15,7 +15,7 @@ internal class AddressesWidget : IDataWindowWidget
|
|||
private nint sigResult = nint.Zero;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "address" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["address"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Addresses";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ internal class AetherytesWidget : IDataWindowWidget
|
|||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "aetherytes" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["aetherytes"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Aetherytes";
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ using System.Numerics;
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
using Lumina.Text.ReadOnly;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
@ -32,7 +34,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
|
|||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "atkarray" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["atkarray"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Atk Array Data";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ internal class BuddyListWidget : IDataWindowWidget
|
|||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "buddy", "buddylist" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["buddy", "buddylist"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Buddy List";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System.Linq;
|
|||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
@ -13,7 +12,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class CommandWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "command" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["command"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Command";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Utility;
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ internal class ConditionWidget : IDataWindowWidget
|
|||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "condition" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["condition"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Condition";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Utility;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
@ -9,7 +9,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class ConfigurationWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "config", "configuration" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["config", "configuration"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Configuration";
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Dalamud.Interface.ImGuiNotification.Internal;
|
|||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Plugin.Ipc.Internal;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using Formatting = Newtonsoft.Json.Formatting;
|
||||
|
|
@ -28,13 +29,13 @@ internal class DataShareWidget : IDataWindowWidget
|
|||
{
|
||||
private const ImGuiTabItemFlags NoCloseButton = (ImGuiTabItemFlags)(1 << 20);
|
||||
|
||||
private readonly List<(string Name, byte[]? Data)> dataView = new();
|
||||
private readonly List<(string Name, byte[]? Data)> dataView = [];
|
||||
private int nextTab = -1;
|
||||
private IReadOnlyDictionary<string, CallGateChannel>? gates;
|
||||
private List<CallGateChannel>? gatesSorted;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "datashare" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["datashare"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Data Share & Call Gate";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
|
|
@ -21,7 +21,7 @@ internal class DtrBarWidget : IDataWindowWidget, IDisposable
|
|||
private CancellationTokenSource? loadTestThreadCt;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "dtr", "dtrbar" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["dtr", "dtrbar"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "DTR Bar";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.ClientState.Fates;
|
||||
using Dalamud.Interface.Textures.Internal;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
@ -12,7 +11,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class FateTableWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "fate", "fatetable" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["fate", "fatetable"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Fate Table";
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ internal class FlyTextWidget : IDataWindowWidget
|
|||
private Vector4 flyColor = new(1, 0, 0, 1);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "flytext" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["flytext"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Fly Text";
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget
|
|||
private bool useFixedWidth;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "fa", "fatest", "fontawesome" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["fa", "fatest", "fontawesome"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Font Awesome Test";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System.Collections.Generic;
|
|||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
@ -15,6 +14,7 @@ using Dalamud.Interface.ManagedFontAtlas;
|
|||
using Dalamud.Interface.ManagedFontAtlas.Internals;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Utility;
|
||||
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
@ -25,11 +25,11 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
|
||||
{
|
||||
private static readonly string[] FontScaleModes =
|
||||
{
|
||||
[
|
||||
nameof(FontScaleMode.Default),
|
||||
nameof(FontScaleMode.SkipHandling),
|
||||
nameof(FontScaleMode.UndoGlobalScale),
|
||||
};
|
||||
];
|
||||
|
||||
private ImVectorWrapper<byte> testStringBuffer;
|
||||
private IFontAtlas? privateAtlas;
|
||||
|
|
@ -338,7 +338,7 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
|
|||
|
||||
return;
|
||||
|
||||
void TestSingle(ImFontPtr fontPtr, IFontHandle handle)
|
||||
static void TestSingle(ImFontPtr fontPtr, IFontHandle handle)
|
||||
{
|
||||
var dim = ImGui.CalcTextSizeA(fontPtr, fontPtr.FontSize, float.MaxValue, 0f, "Test string"u8, out _);
|
||||
Log.Information($"{nameof(GamePrebakedFontsTestWidget)}: {handle} => {dim}");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.ClientState.GamePad;
|
||||
using Dalamud.Utility;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class GamepadWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "gamepad", "controller" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["gamepad", "controller"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Gamepad";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class GaugeWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "gauge", "jobgauge", "job" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["gauge", "jobgauge", "job"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Job Gauge";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -6,8 +6,11 @@ using System.Threading.Tasks;
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Hooking;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
using Serilog;
|
||||
|
||||
using Windows.Win32.Foundation;
|
||||
using Windows.Win32.UI.WindowsAndMessaging;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class IconBrowserWidget : IDataWindowWidget
|
|||
private Vector2 lastWindowSize = Vector2.Zero;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "icon", "icons" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["icon", "icons"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Icon Browser";
|
||||
|
|
@ -269,7 +269,7 @@ public class IconBrowserWidget : IDataWindowWidget
|
|||
if (this.valueRange is not null)
|
||||
return;
|
||||
|
||||
this.valueRange = new();
|
||||
this.valueRange = [];
|
||||
foreach (var (id, _) in this.iconIdsTask!.Result)
|
||||
{
|
||||
if (this.startRange <= id && id < this.stopRange)
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
/// </summary>
|
||||
internal class ImGuiWidget : IDataWindowWidget
|
||||
{
|
||||
private readonly HashSet<IActiveNotification> notifications = new();
|
||||
private readonly HashSet<IActiveNotification> notifications = [];
|
||||
private NotificationTemplate notificationTemplate;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "imgui" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["imgui"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "ImGui";
|
||||
|
|
@ -334,7 +334,7 @@ internal class ImGuiWidget : IDataWindowWidget
|
|||
private struct NotificationTemplate
|
||||
{
|
||||
public static readonly string[] IconTitles =
|
||||
{
|
||||
[
|
||||
"None (use Type)",
|
||||
"SeIconChar",
|
||||
"FontAwesomeIcon",
|
||||
|
|
@ -344,7 +344,7 @@ internal class ImGuiWidget : IDataWindowWidget
|
|||
"TextureWrap from DalamudAssets(Async)",
|
||||
"TextureWrap from GamePath",
|
||||
"TextureWrap from FilePath",
|
||||
};
|
||||
];
|
||||
|
||||
public static readonly string[] AssetSources =
|
||||
Enum.GetValues<DalamudAsset>()
|
||||
|
|
@ -353,46 +353,46 @@ internal class ImGuiWidget : IDataWindowWidget
|
|||
.ToArray();
|
||||
|
||||
public static readonly string[] ProgressModeTitles =
|
||||
{
|
||||
[
|
||||
"Default",
|
||||
"Random",
|
||||
"Increasing",
|
||||
"Increasing & Auto Dismiss",
|
||||
"Indeterminate",
|
||||
};
|
||||
];
|
||||
|
||||
public static readonly string[] TypeTitles =
|
||||
{
|
||||
[
|
||||
nameof(NotificationType.None),
|
||||
nameof(NotificationType.Success),
|
||||
nameof(NotificationType.Warning),
|
||||
nameof(NotificationType.Error),
|
||||
nameof(NotificationType.Info),
|
||||
};
|
||||
];
|
||||
|
||||
public static readonly string[] InitialDurationTitles =
|
||||
{
|
||||
[
|
||||
"Infinite",
|
||||
"1 seconds",
|
||||
"3 seconds (default)",
|
||||
"10 seconds",
|
||||
};
|
||||
];
|
||||
|
||||
public static readonly string[] HoverExtendDurationTitles =
|
||||
{
|
||||
[
|
||||
"Disable",
|
||||
"1 seconds",
|
||||
"3 seconds (default)",
|
||||
"10 seconds",
|
||||
};
|
||||
];
|
||||
|
||||
public static readonly TimeSpan[] Durations =
|
||||
{
|
||||
[
|
||||
TimeSpan.Zero,
|
||||
TimeSpan.FromSeconds(1),
|
||||
NotificationConstants.DefaultDuration,
|
||||
TimeSpan.FromSeconds(10),
|
||||
};
|
||||
];
|
||||
|
||||
public bool ManualContent;
|
||||
public string Content;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ using Dalamud.Interface.Textures.Internal;
|
|||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Utility;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.ClientState.Keys;
|
||||
using Dalamud.Interface.Colors;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class KeyStateWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "keystate" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["keystate"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "KeyState";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
using System.Collections.Concurrent;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.MarketBoard;
|
||||
using Dalamud.Game.Network.Structures;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
using ImGuiTable = Dalamud.Interface.Utility.ImGuiTable;
|
||||
|
|
@ -44,7 +43,7 @@ internal class MarketBoardWidget : IDataWindowWidget
|
|||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "marketboard" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["marketboard"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Market Board";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ internal class NetworkMonitorWidget : IDataWindowWidget
|
|||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "network", "netmon", "networkmonitor" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["network", "netmon", "networkmonitor"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Network Monitor";
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using Dalamud.Game.ClientState;
|
|||
using Dalamud.Game.Text.Noun;
|
||||
using Dalamud.Game.Text.Noun.Enums;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
using Lumina.Data;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
|
@ -60,7 +61,7 @@ internal class NounProcessorWidget : IDataWindowWidget
|
|||
private int amount = 1;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "noun" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["noun"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Noun Processor";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ internal class ObjectTableWidget : IDataWindowWidget
|
|||
private float maxCharaDrawDistance = 20.0f;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "ot", "objecttable" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["ot", "objecttable"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Object Table";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.ClientState.Party;
|
||||
using Dalamud.Utility;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ internal class PartyListWidget : IDataWindowWidget
|
|||
private bool resolveGameData;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "partylist", "party" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["partylist", "party"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Party List";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ internal class PluginIpcWidget : IDataWindowWidget
|
|||
private string callGateResponse = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "ipc" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["ipc"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Plugin IPC";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Linq;
|
||||
using System.Linq;
|
||||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.Text;
|
||||
|
|
@ -11,7 +11,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
internal class SeFontTestWidget : IDataWindowWidget
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "sefont", "sefonttest" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["sefont", "sefonttest"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "SeFont Test";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ using Dalamud.Interface.Utility.Internal;
|
|||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Storage.Assets;
|
||||
using Dalamud.Utility;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
using Lumina.Excel.Sheets;
|
||||
using Lumina.Text;
|
||||
using Lumina.Text.Parse;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
|
|
@ -16,15 +16,15 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
|||
/// </summary>
|
||||
internal class ServicesWidget : IDataWindowWidget
|
||||
{
|
||||
private readonly Dictionary<ServiceDependencyNode, Vector4> nodeRects = new();
|
||||
private readonly HashSet<Type> selectedNodes = new();
|
||||
private readonly HashSet<Type> tempRelatedNodes = new();
|
||||
private readonly Dictionary<ServiceDependencyNode, Vector4> nodeRects = [];
|
||||
private readonly HashSet<Type> selectedNodes = [];
|
||||
private readonly HashSet<Type> tempRelatedNodes = [];
|
||||
|
||||
private bool includeUnloadDependencies;
|
||||
private List<List<ServiceDependencyNode>>? dependencyNodes;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "services" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["services"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Service Container";
|
||||
|
|
@ -280,9 +280,9 @@ internal class ServicesWidget : IDataWindowWidget
|
|||
|
||||
private class ServiceDependencyNode
|
||||
{
|
||||
private readonly List<ServiceDependencyNode> parents = new();
|
||||
private readonly List<ServiceDependencyNode> children = new();
|
||||
private readonly List<ServiceDependencyNode> invalidParents = new();
|
||||
private readonly List<ServiceDependencyNode> parents = [];
|
||||
private readonly List<ServiceDependencyNode> children = [];
|
||||
private readonly List<ServiceDependencyNode> invalidParents = [];
|
||||
|
||||
private ServiceDependencyNode(Type t)
|
||||
{
|
||||
|
|
@ -370,7 +370,7 @@ internal class ServicesWidget : IDataWindowWidget
|
|||
foreach (var n in CreateTree(includeUnloadDependencies))
|
||||
{
|
||||
while (res.Count <= n.Level)
|
||||
res.Add(new());
|
||||
res.Add([]);
|
||||
res[n.Level].Add(n);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ using Dalamud.Interface.Utility;
|
|||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Utility;
|
||||
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ using Dalamud.Interface.Utility.Raii;
|
|||
using Dalamud.Plugin.Services;
|
||||
using Dalamud.Storage.Assets;
|
||||
using Dalamud.Utility;
|
||||
|
||||
using TerraFX.Interop.DirectX;
|
||||
|
||||
using TextureManager = Dalamud.Interface.Textures.Internal.TextureManager;
|
||||
|
|
@ -142,10 +143,10 @@ internal class TexWidget : IDataWindowWidget
|
|||
conf.QueueSave();
|
||||
}
|
||||
|
||||
var allBlames = this.textureManager.BlameTracker;
|
||||
lock (allBlames)
|
||||
lock (this.textureManager.BlameTracker)
|
||||
{
|
||||
using var pushedId = ImRaii.PushId("blames"u8);
|
||||
var allBlames = this.textureManager.BlameTracker;
|
||||
var sizeSum = allBlames.Sum(static x => Math.Max(0, x.RawSpecs.EstimatedBytes));
|
||||
if (ImGui.CollapsingHeader($"All Loaded Textures: {allBlames.Count:n0} ({Util.FormatBytes(sizeSum)})###header"))
|
||||
this.DrawBlame(allBlames);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ internal class ToastWidget : IDataWindowWidget
|
|||
private bool questToastCheckmark;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "toast" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["toast"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "Toast";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using Dalamud.Data;
|
|||
using Dalamud.Interface.ImGuiNotification;
|
||||
using Dalamud.Interface.ImGuiNotification.Internal;
|
||||
using Dalamud.Interface.ImGuiSeStringRenderer.Internal;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using Dalamud.Interface.Textures.Internal;
|
|||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Memory;
|
||||
|
||||
using Lumina.Data.Files;
|
||||
using Lumina.Data.Parsing.Uld;
|
||||
|
||||
|
|
@ -48,6 +49,7 @@ internal class UldWidget : IDataWindowWidget
|
|||
("48 8D 15 ?? ?? ?? ?? 45 33 C0 E9 ?? ?? ?? ??", 3)
|
||||
];
|
||||
|
||||
private DataManager dataManager;
|
||||
private CancellationTokenSource? cts;
|
||||
private Task<string[]>? uldNamesTask;
|
||||
|
||||
|
|
@ -70,6 +72,8 @@ internal class UldWidget : IDataWindowWidget
|
|||
/// <inheritdoc/>
|
||||
public void Load()
|
||||
{
|
||||
this.dataManager ??= Service<DataManager>.Get();
|
||||
|
||||
this.cts?.Cancel();
|
||||
ClearTask(ref this.uldNamesTask);
|
||||
this.uldNamesTask = null;
|
||||
|
|
@ -267,7 +271,7 @@ internal class UldWidget : IDataWindowWidget
|
|||
}
|
||||
|
||||
private string ToThemedPath(string path) =>
|
||||
UldBaseBath + (this.selectedTheme > 0 ? $"img{this.selectedTheme:D2}" : string.Empty) + path[UldBaseBath.Length..];
|
||||
UldBaseBath + (this.selectedTheme > 0 ? $"img{this.selectedTheme:D2}/" : string.Empty) + path[UldBaseBath.Length..];
|
||||
|
||||
private void DrawTextureEntry(UldRoot.TextureEntry textureEntry, TextureManager textureManager)
|
||||
{
|
||||
|
|
@ -295,14 +299,17 @@ internal class UldWidget : IDataWindowWidget
|
|||
else if (e is not null)
|
||||
ImGui.Text(e.ToString());
|
||||
|
||||
if (this.selectedTheme != 0)
|
||||
if (this.selectedTheme != 0 && (textureEntry.ThemeSupportBitmask & (1 << (this.selectedTheme - 1))) != 0)
|
||||
{
|
||||
var texturePathThemed = this.ToThemedPath(texturePath);
|
||||
ImGui.Text($"Themed path at {texturePathThemed}:");
|
||||
if (textureManager.Shared.GetFromGame(texturePathThemed).TryGetWrap(out wrap, out e))
|
||||
ImGui.Image(wrap.Handle, wrap.Size);
|
||||
else if (e is not null)
|
||||
ImGui.Text(e.ToString());
|
||||
if (this.dataManager.FileExists(texturePathThemed))
|
||||
{
|
||||
ImGui.Text($"Themed path at {texturePathThemed}:");
|
||||
if (textureManager.Shared.GetFromGame(texturePathThemed).TryGetWrap(out wrap, out e))
|
||||
ImGui.Image(wrap.Handle, wrap.Size);
|
||||
else if (e is not null)
|
||||
ImGui.Text(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.IO;
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Configuration.Internal;
|
||||
using Dalamud.Storage;
|
||||
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||
|
|
@ -17,7 +18,7 @@ internal class VfsWidget : IDataWindowWidget
|
|||
private int reps = 1;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string[]? CommandShortcuts { get; init; } = { "vfs" };
|
||||
public string[]? CommandShortcuts { get; init; } = ["vfs"];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string DisplayName { get; init; } = "VFS Performance";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue