Class InputModule
Abstract input module class
Inheritance
Namespace
Syntax
public abstract class InputModule
Properties
Background
Background color
Property Value
Declaration
public Color Background { get; set; }
BlankForeground
Blank foreground color
Property Value
Declaration
public Color BlankForeground { get; set; }
Description
Gets the input description
Property Value
Declaration
public string Description { get; set; }
ExtraPopoverHeight
Extra popover height to add
Property Value
Declaration
public virtual int ExtraPopoverHeight { get; protected set; }
Foreground
Foreground color
Property Value
Declaration
public Color Foreground { get; set; }
Name
Gets the input name
Property Value
Declaration
public string Name { get; set; }
Provided
If the input is provided or not
Property Value
Declaration
public bool Provided { get; protected set; }
UseColor
Whether to use the colors or not
Property Value
Declaration
public bool UseColor { get; set; }
Value
Gets the processed value
Property Value
Declaration
public object? Value { get; set; }
Methods
GetValue<T>()
Gets a strongly-typed value
Returns
Strongly-typed value
Declaration
public T? GetValue<T>()
Type Parameters
| Name | Description |
|---|---|
| T | Target value type |
ProcessInput(Coordinate, Size)
Processes the input by prompting user
Declaration
public abstract void ProcessInput(Coordinate inputPopoverPos = default, Size inputPopoverSize = default)
Parameters
| Name | Type | Description |
|---|---|---|
| inputPopoverPos | Coordinate | Input popover position. If there is no popover, it can be the same as the beginning of the input |
| inputPopoverSize | Size | Input popover size. If there is no popover, it can be the same as the input height and/or width |
RenderInput(int)
Renders the input before the control goes to this input module (before ProcessInput(Coordinate, Size) is called)
Returns
A string that can be rendered to the console
Declaration
public abstract string RenderInput(int width)
Parameters
| Name | Type | Description |
|---|---|---|
| width | int | Input width (excluding the input name width) |