mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-20 23:07:43 +01:00
Allow setting a DisplayOrder on commands (#2162)
* Allow setting a DisplayOrder on commands * Linq on demand * Sort commands in /help alphabetically * note default in xmldoc --------- Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
This commit is contained in:
parent
0b9a2fd9c8
commit
f2c132c7d8
3 changed files with 14 additions and 5 deletions
|
|
@ -11,7 +11,7 @@ public interface IReadOnlyCommandInfo
|
|||
/// <param name="command">The command itself.</param>
|
||||
/// <param name="arguments">The arguments supplied to the command, ready for parsing.</param>
|
||||
public delegate void HandlerDelegate(string command, string arguments);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="HandlerDelegate"/> which will be called when the command is dispatched.
|
||||
/// </summary>
|
||||
|
|
@ -26,6 +26,11 @@ public interface IReadOnlyCommandInfo
|
|||
/// Gets a value indicating whether if this command should be shown in the help output.
|
||||
/// </summary>
|
||||
bool ShowInHelp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the display order of this command. Defaults to alphabetical ordering.
|
||||
/// </summary>
|
||||
int DisplayOrder { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -51,4 +56,7 @@ public sealed class CommandInfo : IReadOnlyCommandInfo
|
|||
|
||||
/// <inheritdoc/>
|
||||
public bool ShowInHelp { get; set; } = true;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int DisplayOrder { get; set; } = -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue