Class TuiSlider
- Namespace
- AshConsoleGraphics.Interactive
- Assembly
- AshConsoleGraphics.dll
Visual slider, lets you pick with arrows
public class TuiSlider : TuiSelectable
- Inheritance
-
TuiSlider
- Inherited Members
Constructors
TuiSlider(int, char, char, float, float, Placement, int, int, CharFormat?, CharFormat?, CharFormat?)
Initializes a new slider with the same text color when selected and when not
public TuiSlider(int xs, char b, char s, float interval, float num, Placement p, int x, int y, CharFormat? bf = null, CharFormat? sf = null, CharFormat? pf = null)
Parameters
xsintXsize
bcharBackground char
scharSlider char
intervalfloatnumfloatInitial percentage
pPlacementxintyintbfCharFormatBackground format
sfCharFormatSlider format
pfCharFormatSelector format
TuiSlider(int, char, char, float, float, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?)
Initializes a new slider with all colors
public TuiSlider(int xs, char b, char s, float interval, float num, Placement p, int x, int y, CharFormat? bf, CharFormat? sbf, CharFormat? sf, CharFormat? ssf, CharFormat? pf)
Parameters
xsintXsize
bcharBackground char
scharSlider char
intervalfloatnumfloatInitial percentage
pPlacementxintyintbfCharFormatNot selected background format
sbfCharFormatSelected background format
sfCharFormatNot selected slider format
ssfCharFormatSelected slider format
pfCharFormatSelector format
Fields
Interval
What the percentage will be incremented/decremented each time an arrow is pressed
public float Interval
Field Value
Properties
BackgroundChar
The char of the background part
public char BackgroundChar { get; set; }
Property Value
BackgroundFormat
Not selected background charachters format
public CharFormat? BackgroundFormat { get; set; }
Property Value
Percentage
The percentage of the bar that is filled
public float Percentage { get; set; }
Property Value
SelectedBackgroundFormat
Selected background charachters format
public CharFormat? SelectedBackgroundFormat { get; set; }
Property Value
SelectedSliderFormat
Selected slider charachter format
public CharFormat? SelectedSliderFormat { get; set; }
Property Value
SelectorFormat
Format of the selectors that surround the element when selected
public CharFormat? SelectorFormat { get; set; }
Property Value
SliderChar
The char of the slider part
public char SliderChar { get; set; }
Property Value
SliderFormat
Not selected slider charachter format
public CharFormat? SliderFormat { get; set; }
Property Value
Xsize
public int Xsize { get; set; }
Property Value
Methods
GenerateBuffer()
The method that generates the element's buffer
protected override Buffer GenerateBuffer()
Returns
SliderLeft(TuiSelectable, ConsoleKeyInfo)
Moves slider to the left by the interval ammount
public void SliderLeft(TuiSelectable s, ConsoleKeyInfo ck)
Parameters
SliderRight(TuiSelectable, ConsoleKeyInfo)
Moves slider to the right by the interval ammount
public void SliderRight(TuiSelectable s, ConsoleKeyInfo ck)