-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e71e8f
commit 7fb0714
Showing
27 changed files
with
543 additions
and
244 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
|
||
namespace ConfigurableWarning.API.Attributes; | ||
|
||
/// <summary> | ||
/// Registers any contained options as a part of this category. | ||
/// This is specifically for compat modules. | ||
/// </summary> | ||
[MeansImplicitUse] | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false)] | ||
public class CompatGroup : Attribute { | ||
/// <summary> | ||
/// The category. | ||
/// </summary> | ||
public readonly string Category; | ||
|
||
/// <summary> | ||
/// The tab. If this is null, it will default to the parent's | ||
/// tab. | ||
/// </summary> | ||
public readonly string? Tab; | ||
|
||
/// <summary> | ||
/// Registers any contained options as a part of this category. | ||
/// This is specifically for compat modules. | ||
/// </summary> | ||
/// <param name="category">The category to register to.</param> | ||
public CompatGroup(string category) { | ||
Category = category; | ||
Tab = null; | ||
} | ||
|
||
/// <summary> | ||
/// Registers any contained options as a part of this category, | ||
/// overriding the parent's tab. | ||
/// This is specifically for compat modules. | ||
/// </summary> | ||
/// <param name="tab">The tab</param> | ||
/// <param name="category">The category</param> | ||
public CompatGroup(string tab, string category) { | ||
Tab = tab; | ||
Category = category; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
|
||
namespace ConfigurableWarning.API.Attributes; | ||
|
||
/// <summary> | ||
/// Registers any contained groups as a part of this tab. | ||
/// This is specifically for compat modules. | ||
/// </summary> | ||
[MeansImplicitUse] | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false)] | ||
public class CompatTab : Attribute { | ||
/// <summary> | ||
/// The tab. | ||
/// </summary> | ||
public readonly string? Name; | ||
|
||
/// <summary> | ||
/// Registers any contained groups as a part of this tab. | ||
/// This is specifically for compat modules. | ||
/// </summary> | ||
public CompatTab(string tab) { | ||
Name = tab; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
|
||
namespace ConfigurableWarning.API.Attributes; | ||
|
||
/// <summary> | ||
/// Registers any contained options as a part of this category. | ||
/// </summary> | ||
[MeansImplicitUse] | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false)] | ||
public class Group : Attribute { | ||
/// <summary> | ||
/// The category. | ||
/// </summary> | ||
public readonly string Category; | ||
|
||
/// <summary> | ||
/// The tab. If this is null, it will default to the parent's | ||
/// tab. | ||
/// </summary> | ||
public readonly string? Tab; | ||
|
||
/// <summary> | ||
/// Registers any contained options as a part of this category. | ||
/// </summary> | ||
/// <param name="category">The category to register to.</param> | ||
public Group(string category) { | ||
Category = category; | ||
Tab = null; | ||
} | ||
|
||
/// <summary> | ||
/// Registers any contained options as a part of this category, | ||
/// overriding the parent's tab. | ||
/// </summary> | ||
/// <param name="tab">The tab</param> | ||
/// <param name="category">The category</param> | ||
public Group(string tab, string category) { | ||
Tab = tab; | ||
Category = category; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
|
||
namespace ConfigurableWarning.API.Attributes; | ||
|
||
/// <summary> | ||
/// Registers any contained groups as a part of this tab. | ||
/// </summary> | ||
[MeansImplicitUse] | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false)] | ||
public class Tab : Attribute { | ||
/// <summary> | ||
/// The tab. | ||
/// </summary> | ||
public readonly string? Name; | ||
|
||
/// <summary> | ||
/// Registers any contained groups as a part of this tab. | ||
/// </summary> | ||
/// <param name="tab">The tab.</param> | ||
public Tab(string tab) { | ||
Name = tab; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.