-
-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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,13 @@ | ||
{"version": 2, "width": 122, "height": 24, "title": "columns (plain)", "env": {"TERM": "Spectre.Console"}} | ||
[0, "o", "\u001B[31;40mItem 1\u001B[0m \u001B[32;40mItem 2\u001B[0m \u001B[34;40mItem 3\u001B[0m \r\n"] | ||
[0.203, "o", "\u001B[31;40mItem 4\u001B[0m \u001B[32;40mItem 5\u001B[0m \u001B[34;40mItem 6\u001B[0m \r\n"] | ||
[0.406, "o", "\u001B[31;40mItem 7\u001B[0m \u001B[32;40mItem 8\u001B[0m \u001B[34;40mItem 9\u001B[0m \r\n"] | ||
[0.609, "o", "\u001B[31;40mItem 10\u001B[0m \u001B[32;40mItem 11\u001B[0m \u001B[34;40mItem 12\u001B[0m \r\n"] | ||
[0.813, "o", "\u001B[31;40mItem 13\u001B[0m \u001B[32;40mItem 14\u001B[0m \u001B[34;40mItem 15\u001B[0m \r\n"] | ||
[1.031, "o", "\u001B[31;40mItem 16\u001B[0m \u001B[32;40mItem 17\u001B[0m \u001B[34;40mItem 18\u001B[0m \r\n"] | ||
[1.234, "o", "\u001B[31;40mItem 19\u001B[0m \u001B[32;40mItem 20\u001B[0m \u001B[34;40mItem 21\u001B[0m \r\n"] | ||
[1.438, "o", "\u001B[31;40mItem 22\u001B[0m \u001B[32;40mItem 23\u001B[0m \u001B[34;40mItem 24\u001B[0m \r\n"] | ||
[1.641, "o", "\u001B[31;40mItem 25\u001B[0m \u001B[32;40mItem 26\u001B[0m \u001B[34;40mItem 27\u001B[0m \r\n"] | ||
[1.859, "o", "\u001B[31;40mItem 28\u001B[0m \u001B[32;40mItem 29\u001B[0m \u001B[34;40mItem 30\u001B[0m \r\n"] | ||
[2.063, "o", "\u001B[31;40mItem 31\u001B[0m \u001B[32;40mItem 32\u001B[0m \u001B[34;40mItem 33\u001B[0m \r\n"] | ||
|
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,13 @@ | ||
{"version": 2, "width": 122, "height": 24, "title": "columns (rich)", "env": {"TERM": "Spectre.Console"}} | ||
[0, "o", "\u001B[38;5;9;48;5;0mItem 1\u001B[0m \u001B[38;5;2;48;5;0mItem 2\u001B[0m \u001B[38;5;12;48;5;0mItem 3\u001B[0m \r\n"] | ||
[0.218, "o", "\u001B[38;5;9;48;5;0mItem 4\u001B[0m \u001B[38;5;2;48;5;0mItem 5\u001B[0m \u001B[38;5;12;48;5;0mItem 6\u001B[0m \r\n"] | ||
[0.422, "o", "\u001B[38;5;9;48;5;0mItem 7\u001B[0m \u001B[38;5;2;48;5;0mItem 8\u001B[0m \u001B[38;5;12;48;5;0mItem 9\u001B[0m \r\n"] | ||
[0.625, "o", "\u001B[38;5;9;48;5;0mItem 10\u001B[0m \u001B[38;5;2;48;5;0mItem 11\u001B[0m \u001B[38;5;12;48;5;0mItem 12\u001B[0m \r\n"] | ||
[0.828, "o", "\u001B[38;5;9;48;5;0mItem 13\u001B[0m \u001B[38;5;2;48;5;0mItem 14\u001B[0m \u001B[38;5;12;48;5;0mItem 15\u001B[0m \r\n"] | ||
[1.031, "o", "\u001B[38;5;9;48;5;0mItem 16\u001B[0m \u001B[38;5;2;48;5;0mItem 17\u001B[0m \u001B[38;5;12;48;5;0mItem 18\u001B[0m \r\n"] | ||
[1.234, "o", "\u001B[38;5;9;48;5;0mItem 19\u001B[0m \u001B[38;5;2;48;5;0mItem 20\u001B[0m \u001B[38;5;12;48;5;0mItem 21\u001B[0m \r\n"] | ||
[1.437, "o", "\u001B[38;5;9;48;5;0mItem 22\u001B[0m \u001B[38;5;2;48;5;0mItem 23\u001B[0m \u001B[38;5;12;48;5;0mItem 24\u001B[0m \r\n"] | ||
[1.64, "o", "\u001B[38;5;9;48;5;0mItem 25\u001B[0m \u001B[38;5;2;48;5;0mItem 26\u001B[0m \u001B[38;5;12;48;5;0mItem 27\u001B[0m \r\n"] | ||
[1.859, "o", "\u001B[38;5;9;48;5;0mItem 28\u001B[0m \u001B[38;5;2;48;5;0mItem 29\u001B[0m \u001B[38;5;12;48;5;0mItem 30\u001B[0m \r\n"] | ||
[2.047, "o", "\u001B[38;5;9;48;5;0mItem 31\u001B[0m \u001B[38;5;2;48;5;0mItem 32\u001B[0m \u001B[38;5;12;48;5;0mItem 33\u001B[0m \r\n"] | ||
|
22 changes: 22 additions & 0 deletions
22
resources/scripts/Generator/Commands/AsciiCast/Samples/ColumnsSample.cs
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,22 @@ | ||
using System.Threading; | ||
using Spectre.Console; | ||
|
||
namespace Generator.Commands.Samples | ||
{ | ||
public class ColumnsSample : BaseSample | ||
{ | ||
public override void Run(IAnsiConsole console) | ||
{ | ||
for (var i = 0; i <= 10; i++) | ||
{ | ||
var n = 3 * i + 1; | ||
console.Write(new Columns( | ||
new Text($"Item {n}", new Style(Color.Red, Color.Black)), | ||
new Text($"Item {n+1}", new Style(Color.Green, Color.Black)), | ||
new Text($"Item {n+2}", new Style(Color.Blue, Color.Black)) | ||
)); | ||
Thread.Sleep(200); | ||
} | ||
} | ||
} | ||
} |