Skip to content

Commit

Permalink
Update ConsoleHelpFrameBuilder.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
benpollarduk authored Nov 22, 2024
1 parent 087e51c commit 213e0fd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ public IFrame Build(string title, CommandHelp commandHelp, Size size)
const int leftMargin = 2;

gridStringBuilder.DrawWrapped(title, leftMargin, 2, availableWidth, TitleColor, out _, out var lastY);
gridStringBuilder.DrawUnderline(leftMargin, lastY + 1, title.Length, CommandColor);
gridStringBuilder.DrawUnderline(leftMargin, lastY + 1, title.Length, TitleColor);

lastY += 3;

gridStringBuilder.DrawWrapped($"Command: {commandHelp.Command}", leftMargin, lastY, availableWidth, CommandDescriptionColor, out _, out lastY);
gridStringBuilder.DrawWrapped($"Command: {commandHelp.Command}", leftMargin, lastY, availableWidth, CommandColor, out _, out lastY);

if (!string.IsNullOrEmpty(commandHelp.Shortcut))
gridStringBuilder.DrawWrapped($"Shortcut: {commandHelp.Shortcut}", leftMargin, lastY + 2, availableWidth, CommandColor, out _, out lastY);

gridStringBuilder.DrawWrapped($"Description: {commandHelp.Description.EnsureFinishedSentence()}", leftMargin, lastY + 2, availableWidth, CommandDescriptionColor, out _, out lastY);

Expand Down

0 comments on commit 213e0fd

Please sign in to comment.