mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 10:35:27 +08:00 
			
		
		
		
	Add support for fake input in asciicast recordings
* Fixes a bug with `SelectionPrompt` and page size. * Allow `IAnsiConsoleInput` to return `null`.
This commit is contained in:
		
				
					committed by
					
						
						Phil Scott
					
				
			
			
				
	
			
			
			
						parent
						
							46abadaccb
						
					
				
				
					commit
					450d87f5d3
				
			@@ -0,0 +1,16 @@
 | 
			
		||||
using Spectre.Console;
 | 
			
		||||
 | 
			
		||||
namespace Generator.Commands.Samples
 | 
			
		||||
{
 | 
			
		||||
    public class FigletSample : BaseSample
 | 
			
		||||
    {
 | 
			
		||||
        public override (int Cols, int Rows) ConsoleSize => (120, 24);
 | 
			
		||||
 | 
			
		||||
        public override void Run(IAnsiConsole console)
 | 
			
		||||
        {
 | 
			
		||||
            console.Write(new FigletText("Left aligned").LeftAligned().Color(Color.Red));
 | 
			
		||||
            console.Write(new FigletText("Centered").Centered().Color(Color.Green));
 | 
			
		||||
            console.Write(new FigletText("Right aligned").RightAligned().Color(Color.Blue));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user