Add interfaces to non public/sealed classes referenced in public interfaces (#1808)

* Add interfaces to non public/sealed classes referenced in public interfaces

* Fixed inheritdocs + made most classes internal

* Add missing properties to IFate and Fate, fix documentation

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
This commit is contained in:
Blair 2024-06-29 07:05:34 +10:00 committed by GitHub
parent 3994f528b8
commit 7947b896ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 1466 additions and 584 deletions

View file

@ -56,8 +56,8 @@ internal class CommandWidget : IDataWindowWidget
? commands.OrderBy(kv => kv.Key).ToArray()
: commands.OrderByDescending(kv => kv.Key).ToArray(),
1 => sortSpecs.Specs.SortDirection == ImGuiSortDirection.Ascending
? commands.OrderBy(kv => kv.Value.LoaderAssemblyName).ToArray()
: commands.OrderByDescending(kv => kv.Value.LoaderAssemblyName).ToArray(),
? commands.OrderBy(kv => commandManager.GetHandlerAssemblyName(kv.Key, kv.Value)).ToArray()
: commands.OrderByDescending(kv => commandManager.GetHandlerAssemblyName(kv.Key, kv.Value)).ToArray(),
_ => commands,
};
}
@ -70,7 +70,7 @@ internal class CommandWidget : IDataWindowWidget
ImGui.Text(command.Key);
ImGui.TableNextColumn();
ImGui.Text(command.Value.LoaderAssemblyName);
ImGui.Text(commandManager.GetHandlerAssemblyName(command.Key, command.Value));
ImGui.TableNextColumn();
ImGui.TextWrapped(command.Value.HelpMessage);

View file

@ -10,9 +10,9 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
/// </summary>
internal class DtrBarWidget : IDataWindowWidget
{
private DtrBarEntry? dtrTest1;
private DtrBarEntry? dtrTest2;
private DtrBarEntry? dtrTest3;
private IDtrBarEntry? dtrTest1;
private IDtrBarEntry? dtrTest2;
private IDtrBarEntry? dtrTest3;
/// <inheritdoc/>
public string[]? CommandShortcuts { get; init; } = { "dtr", "dtrbar" };
@ -51,7 +51,7 @@ internal class DtrBarWidget : IDataWindowWidget
}
}
private void DrawDtrTestEntry(ref DtrBarEntry? entry, string title)
private void DrawDtrTestEntry(ref IDtrBarEntry? entry, string title)
{
var dtrBar = Service<DtrBar>.Get();

View file

@ -2597,7 +2597,7 @@ internal class PluginInstallerWindow : Window, IDisposable
var commands = commandManager.Commands
.Where(cInfo =>
cInfo.Value is { ShowInHelp: true } &&
cInfo.Value.LoaderAssemblyName == plugin.Manifest.InternalName)
commandManager.GetHandlerAssemblyName(cInfo.Key, cInfo.Value) == plugin.Manifest.InternalName)
.ToArray();
if (commands.Any())

View file

@ -123,7 +123,7 @@ internal class ContextMenuAgingStep : IAgingStep
this.targetCharacter = null;
}
private void OnMenuOpened(MenuOpenedArgs args)
private void OnMenuOpened(IMenuOpenedArgs args)
{
this.LogMenuOpened(args);
@ -139,11 +139,11 @@ internal class ContextMenuAgingStep : IAgingStep
PrefixColor = 56,
Priority = -1,
IsSubmenu = true,
OnClicked = (MenuItemClickedArgs a) =>
OnClicked = (IMenuItemClickedArgs a) =>
{
SeString name;
uint count;
var targetItem = (a.Target as MenuTargetInventory).TargetItem;
var targetItem = (a.Target as MenuTargetInventory)!.TargetItem;
if (targetItem is { } item)
{
name = (this.itemSheet.GetRow(item.ItemId)?.Name.ToDalamudString() ?? $"Unknown ({item.ItemId})") + (item.IsHq ? $" {SeIconChar.HighQuality.ToIconString()}" : string.Empty);
@ -186,7 +186,7 @@ internal class ContextMenuAgingStep : IAgingStep
}
}
private void LogMenuOpened(MenuOpenedArgs args)
private void LogMenuOpened(IMenuOpenedArgs args)
{
Log.Verbose($"Got {args.MenuType} context menu with addon 0x{args.AddonPtr:X8} ({args.AddonName}) and agent 0x{args.AgentPtr:X8}");
if (args.Target is MenuTargetDefault targetDefault)

View file

@ -51,7 +51,7 @@ internal class PartyFinderAgingStep : IAgingStep
}
}
private void PartyFinderOnReceiveListing(PartyFinderListing listing, PartyFinderListingEventArgs args)
private void PartyFinderOnReceiveListing(IPartyFinderListing listing, IPartyFinderListingEventArgs args)
{
this.hasPassed = true;
}

View file

@ -147,7 +147,7 @@ internal class TitleScreenMenuWindow : Window, IDisposable
return;
var scale = ImGui.GetIO().FontGlobalScale;
var entries = this.titleScreenMenu.Entries;
var entries = this.titleScreenMenu.PluginEntries;
var hovered = ImGui.IsWindowHovered(
ImGuiHoveredFlags.RootAndChildWindows |
@ -283,7 +283,7 @@ internal class TitleScreenMenuWindow : Window, IDisposable
}
private bool DrawEntry(
TitleScreenMenuEntry entry, bool inhibitFadeout, bool showText, bool isFirst, bool overrideAlpha, bool interactable)
ITitleScreenMenuEntry entry, bool inhibitFadeout, bool showText, bool isFirst, bool overrideAlpha, bool interactable)
{
using var fontScopeDispose = this.myFontHandle.Value.Push();