Class FloatSelector
- Namespace
- ConsoleAppVisuals.InteractiveElements
- Assembly
- ConsoleAppVisuals.dll
The FloatSelector is an interactive element that allows the user to select a float value from a range of values.
public class FloatSelector : InteractiveElement<float>
- Inheritance
-
FloatSelector
- Inherited Members
Remarks
For more information, consider visiting the documentation available here.
Constructors
FloatSelector(string, float, float, float, float, Placement, BordersType)
The FloatSelector is an interactive element that allows the user to select a float value from a range of values.
public FloatSelector(string question, float min, float max, float start, float step, Placement placement = Placement.TopCenter, BordersType bordersType = BordersType.SingleStraight)
Parameters
question
stringThe question to ask the user.
min
floatThe minimum value of the selector.
max
floatThe maximum value of the selector.
start
floatThe start value of the selector.
step
floatThe step of the selector.
placement
PlacementThe placement of the selector on the console.
bordersType
BordersTypeThe type of the borders of the selector.
Remarks
For more information, consider visiting the documentation available here.
Properties
Borders
Gets the borders manager of the selector.
public Borders Borders { get; }
Property Value
BordersType
Gets the type of the borders of the selector.
public BordersType BordersType { get; }
Property Value
Height
Gets the height of the selector.
public override int Height { get; }
Property Value
LeftSelector
Gets the left selector of the selector.
public char LeftSelector { get; }
Property Value
Max
Gets the maximum value of the selector.
public float Max { get; }
Property Value
Min
Gets the minimum value of the selector.
public float Min { get; }
Property Value
Placement
Gets the placement of the selector on the console.
public override Placement Placement { get; }
Property Value
Question
Gets the question to ask the user.
public string Question { get; }
Property Value
RightSelector
Gets the right selector of the selector.
public char RightSelector { get; }
Property Value
Start
Gets the start value of the selector.
public float Start { get; }
Property Value
Step
Gets the step of the selector.
public float Step { get; }
Property Value
Width
Gets the width of the selector.
public override int Width { get; }
Property Value
Methods
RenderElementActions()
Defines the actions to perform when the element is called to be rendered on the console.
[Visual]
protected override void RenderElementActions()
UpdateBordersType(BordersType)
Updates the type of the borders of the selector.
public void UpdateBordersType(BordersType bordersType)
Parameters
bordersType
BordersTypeThe new type of the borders of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateLeftSelector(char)
Updates the selector of the selector.
public void UpdateLeftSelector(char leftSelector = '▶')
Parameters
leftSelector
charThe new left selector of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateMax(float)
Updates the maximum value of the selector.
public void UpdateMax(float max)
Parameters
max
floatThe maximum value of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateMin(float)
Updates the minimum value of the selector.
public void UpdateMin(float min)
Parameters
min
floatThe minimum value of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdatePlacement(Placement)
Updates the placement of the selector.
public void UpdatePlacement(Placement placement)
Parameters
placement
PlacementThe placement of the selector on the console.
Remarks
For more information, consider visiting the documentation available here.
UpdateQuestion(string)
Updates the question of the selector.
public void UpdateQuestion(string question)
Parameters
question
stringThe question to ask the user.
Remarks
For more information, consider visiting the documentation available here.
UpdateRightSelector(char)
Updates the selector of the selector.
public void UpdateRightSelector(char rightSelector = '◀')
Parameters
rightSelector
charThe new right selector of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateStart(float)
Updates the start value of the selector.
public void UpdateStart(float start)
Parameters
start
floatThe start value of the selector.
Remarks
For more information, consider visiting the documentation available here.
UpdateStep(float)
Updates the step of the selector.
public void UpdateStep(float step)
Parameters
step
floatThe step of the selector.
Remarks
For more information, consider visiting the documentation available here.