mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Add interactive prompts for selecting values
* Adds SelectionPrompt * Adds MultiSelectionPrompt Closes #210
This commit is contained in:

committed by
Patrik Svensson

parent
3a593857c8
commit
0e0f4b4220
@ -26,10 +26,10 @@ namespace Spectre.Console.Internal
|
||||
{
|
||||
if (_out.IsStandardOut())
|
||||
{
|
||||
return ConsoleHelper.GetSafeBufferWidth(Constants.DefaultBufferWidth);
|
||||
return ConsoleHelper.GetSafeWidth(Constants.DefaultTerminalWidth);
|
||||
}
|
||||
|
||||
return Constants.DefaultBufferWidth;
|
||||
return Constants.DefaultTerminalWidth;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,10 +39,10 @@ namespace Spectre.Console.Internal
|
||||
{
|
||||
if (_out.IsStandardOut())
|
||||
{
|
||||
return ConsoleHelper.GetSafeBufferHeight(Constants.DefaultBufferHeight);
|
||||
return ConsoleHelper.GetSafeHeight(Constants.DefaultTerminalHeight);
|
||||
}
|
||||
|
||||
return Constants.DefaultBufferHeight;
|
||||
return Constants.DefaultTerminalHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,12 +21,12 @@ namespace Spectre.Console.Internal
|
||||
|
||||
public int Width
|
||||
{
|
||||
get { return ConsoleHelper.GetSafeBufferWidth(Constants.DefaultBufferWidth); }
|
||||
get { return ConsoleHelper.GetSafeWidth(Constants.DefaultTerminalWidth); }
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get { return ConsoleHelper.GetSafeBufferHeight(Constants.DefaultBufferHeight); }
|
||||
get { return ConsoleHelper.GetSafeHeight(Constants.DefaultTerminalHeight); }
|
||||
}
|
||||
|
||||
public FallbackBackend(TextWriter @out, Capabilities capabilities)
|
||||
|
Reference in New Issue
Block a user