From de8d5cea366cf5d8f0766caaf946b2a1c94d2d03 Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Fri, 12 Jul 2024 02:01:21 +0200 Subject: [PATCH] Update for new Resonite Version and add some docs --- ComponentSelectorAdditions/ComponentResult.cs | 32 +++++++++++++- .../ComponentSelectorAdditions.csproj | 14 +++--- .../Events/BuildCustomGenericBuilder.cs | 2 +- .../Events/BuildSelectorFooterEvent.cs | 2 +- .../Events/BuildSelectorHeaderEvent.cs | 2 +- .../Events/EnumerateCategoriesEvent.cs | 2 +- .../Events/EnumerateComponentsEvent.cs | 3 +- .../Events/EnumerateConcreteGenericsEvent.cs | 11 ++++- .../FavoritesCategories.cs | 39 +++++++++-------- ComponentSelectorAdditions/FavoritesConfig.cs | 9 ++++ ComponentSelectorAdditions/Injector.cs | 4 +- .../RecentsCategories.cs | 2 +- ComponentSelectorAdditions/SearchBar.cs | 2 +- ComponentSelectorAdditions/SearchConfig.cs | 23 +++++++++- ComponentSelectorAdditions/SelectorPath.cs | 43 +++++++++++++++++++ .../SelectorSearchBar.cs | 41 ++++++++++++++++-- 16 files changed, 189 insertions(+), 42 deletions(-) diff --git a/ComponentSelectorAdditions/ComponentResult.cs b/ComponentSelectorAdditions/ComponentResult.cs index 33af9a2..1497059 100644 --- a/ComponentSelectorAdditions/ComponentResult.cs +++ b/ComponentSelectorAdditions/ComponentResult.cs @@ -10,22 +10,52 @@ namespace ComponentSelectorAdditions { + /// + /// Represents a component or node returned by the . + /// public sealed class ComponentResult { + /// + /// Gets the category that should be shown as the Type's parent. + /// public CategoryNode Category { get; } - public string FullName => Type.FullName; + + /// + /// Gets the Type's group identifier, if present. + /// public string? Group { get; } + /// + /// Gets the Type's group name, if present. + /// public string? GroupName { get; } + /// + /// Gets whether the Type is part of a group. + /// [MemberNotNullWhen(true, nameof(Group), nameof(GroupName))] public bool HasGroup => Group is not null; + /// + /// Gets whether this Type is a generic type definition. + /// public bool IsGeneric => Type.IsGenericTypeDefinition; + /// + /// Gets the Type's nice name. + /// public string NiceName => Type.GetNiceName(); + + /// + /// Gets the component / node result. + /// public Type Type { get; } + /// + /// Creates a new component / node result with the given category. + /// + /// The category that should be shown as the Type's parent. + /// The component / node . public ComponentResult(CategoryNode category, Type type) { Type = type; diff --git a/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj b/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj index 378edc3..a496715 100644 --- a/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj +++ b/ComponentSelectorAdditions/ComponentSelectorAdditions.csproj @@ -11,7 +11,7 @@ ComponentSelectorAdditions Component Selector Additions Banane9 - 0.2.0-beta + 0.3.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 @@ -30,17 +30,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + diff --git a/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs b/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs index 20d2b2d..f4077bd 100644 --- a/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs +++ b/ComponentSelectorAdditions/Events/BuildCustomGenericBuilder.cs @@ -38,7 +38,7 @@ public sealed class BuildCustomGenericBuilder : BuildUIEvent public IEnumerable