diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e0e9bb..c0386f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: - name: Setup Dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.x + dotnet-version: 9.x source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json - name: Add MonkeyLoader NuGet Source @@ -98,7 +98,7 @@ jobs: - name: Setup Dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.x + dotnet-version: 9.x source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json - name: Add MonkeyLoader NuGet Source diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 059338c..3fe7a28 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -68,7 +68,7 @@ jobs: - name: Setup Dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.x + dotnet-version: 9.x source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json - name: Add MonkeyLoader NuGet Source diff --git a/ComponentSelectorAdditions/ComponentResult.cs b/ComponentSelectorAdditions/ComponentResult.cs index 57ced2a..aac0201 100644 --- a/ComponentSelectorAdditions/ComponentResult.cs +++ b/ComponentSelectorAdditions/ComponentResult.cs @@ -86,7 +86,7 @@ public ComponentResult(CategoryNode? category, Type type, string? group) } /// - public override bool Equals(object obj) + public override bool Equals(object? obj) => obj is ComponentResult otherResult && otherResult.Type == Type; /// diff --git a/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj b/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj index 0bb020d..cdee5bf 100644 --- a/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj +++ b/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj @@ -1,6 +1,5 @@  - netstandard2.0 ComponentSelectorAdditions $(AssemblyTitle).dll ComponentSelectorAdditions @@ -11,11 +10,12 @@ ComponentSelectorAdditions Component Selector Additions Banane9 - 0.9.0-beta + 0.10.0-beta This MonkeyLoader mod for Resonite overhauls the Component Selector / Protoflux Node Selector to have a search, as well as favorites and recents categories. README.md LGPL-3.0-or-later https://github.com/ResoniteModdingGroup/ComponentSelectorAdditions + $(PackageProjectUrl).git mod; mods; monkeyloader; resonite; component; attacher; selector; protoflux; node; picker; search; favorites @@ -30,18 +30,18 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/ComponentSelectorAdditions/Events/BuildButtonEvent.cs b/ComponentSelectorAdditions/Events/BuildButtonEvent.cs index 8ab6778..9ea6e70 100644 --- a/ComponentSelectorAdditions/Events/BuildButtonEvent.cs +++ b/ComponentSelectorAdditions/Events/BuildButtonEvent.cs @@ -9,13 +9,49 @@ namespace ComponentSelectorAdditions.Events { + /// + /// Abstract base class for button generation events. + /// public abstract class BuildButtonEvent : CancelableBuildUIEvent { + /// + /// Gets whether the target of the button being generated is + /// a direct element + /// of the current root category. + /// public bool IsDirectItem { get; } + + /// + /// Gets the category that the target of the button belongs to, if available. + /// public CategoryNode? ItemCategory { get; } + + /// + /// Gets the current root category of the selector + /// that the button is being generated for, if available. + /// public CategoryNode? RootCategory { get; } + + /// + /// Gets the selector that the button is being generated for. + /// public ComponentSelector Selector { get; } + /// + /// Creates a new button generation event with the given data. + /// + /// The selector that the button is being generated for. + /// The to use while generating extra UI elements. + /// + /// The current root category of the selector + /// that the button is being generated for, if available. + /// + /// The category that the target of the button belongs to, if available. + /// + /// Whether the target of the button being generated is + /// a direct element + /// of the current root category. + /// protected BuildButtonEvent(ComponentSelector selector, UIBuilder ui, CategoryNode? rootCategory, CategoryNode? itemCategory, bool isDirectItem) : base(ui) { Selector = selector; diff --git a/ComponentSelectorAdditions/Events/BuildCategoryButtonEvent.cs b/ComponentSelectorAdditions/Events/BuildCategoryButtonEvent.cs index ad1f4f2..a54444d 100644 --- a/ComponentSelectorAdditions/Events/BuildCategoryButtonEvent.cs +++ b/ComponentSelectorAdditions/Events/BuildCategoryButtonEvent.cs @@ -8,6 +8,13 @@ namespace ComponentSelectorAdditions.Events { + /// + /// Represents the event data for the Build Category Button Event. + /// + /// + /// This is used to generate the button for opening a nested + /// category in a selector. + /// public sealed class BuildCategoryButtonEvent : BuildButtonEvent { /// diff --git a/ComponentSelectorAdditions/Events/BuildComponentButtonEvent.cs b/ComponentSelectorAdditions/Events/BuildComponentButtonEvent.cs index 5e044a4..48ae7b2 100644 --- a/ComponentSelectorAdditions/Events/BuildComponentButtonEvent.cs +++ b/ComponentSelectorAdditions/Events/BuildComponentButtonEvent.cs @@ -8,10 +8,23 @@ namespace ComponentSelectorAdditions.Events { + /// + /// Represents the event data for the Build Component Button Event. + /// + /// + /// This is used to generate the button to attach a concrete component, + /// or to open the custom generic selection page for open generics. + /// public sealed class BuildComponentButtonEvent : BuildButtonEvent { + /// + /// Gets the component result that the button targets. + /// public ComponentResult Component { get; } + /// + /// Gets the current selector path. + /// public SelectorPath Path { get; } /// diff --git a/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs b/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs index f1b273f..c38198a 100644 --- a/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs +++ b/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs @@ -11,13 +11,27 @@ namespace ComponentSelectorAdditions.Events { + /// + /// Represents the event data for the Build Custom Generic Builder Event. + /// + /// + /// This is used to generate the UI for picking custom generic arguments for generic components. + /// public sealed class BuildCustomGenericBuilder : BuildUIEvent { internal readonly HashSet