Table of Contents

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

xs int

Xsize

b char

Background char

s char

Slider char

interval float
num float

Initial percentage

p Placement
x int
y int
bf CharFormat

Background format

sf CharFormat

Slider format

pf CharFormat

Selector 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

xs int

Xsize

b char

Background char

s char

Slider char

interval float
num float

Initial percentage

p Placement
x int
y int
bf CharFormat

Not selected background format

sbf CharFormat

Selected background format

sf CharFormat

Not selected slider format

ssf CharFormat

Selected slider format

pf CharFormat

Selector format

Fields

Interval

What the percentage will be incremented/decremented each time an arrow is pressed

public float Interval

Field Value

float

Properties

BackgroundChar

The char of the background part

public char BackgroundChar { get; set; }

Property Value

char

BackgroundFormat

Not selected background charachters format

public CharFormat? BackgroundFormat { get; set; }

Property Value

CharFormat

Percentage

The percentage of the bar that is filled

public float Percentage { get; set; }

Property Value

float

SelectedBackgroundFormat

Selected background charachters format

public CharFormat? SelectedBackgroundFormat { get; set; }

Property Value

CharFormat

SelectedSliderFormat

Selected slider charachter format

public CharFormat? SelectedSliderFormat { get; set; }

Property Value

CharFormat

SelectorFormat

Format of the selectors that surround the element when selected

public CharFormat? SelectorFormat { get; set; }

Property Value

CharFormat

SliderChar

The char of the slider part

public char SliderChar { get; set; }

Property Value

char

SliderFormat

Not selected slider charachter format

public CharFormat? SliderFormat { get; set; }

Property Value

CharFormat

Xsize

public int Xsize { get; set; }

Property Value

int

Methods

GenerateBuffer()

The method that generates the element's buffer

protected override Buffer GenerateBuffer()

Returns

Buffer

SliderLeft(TuiSelectable, ConsoleKeyInfo)

Moves slider to the left by the interval ammount

public void SliderLeft(TuiSelectable s, ConsoleKeyInfo ck)

Parameters

s TuiSelectable
ck ConsoleKeyInfo

SliderRight(TuiSelectable, ConsoleKeyInfo)

Moves slider to the right by the interval ammount

public void SliderRight(TuiSelectable s, ConsoleKeyInfo ck)

Parameters

s TuiSelectable
ck ConsoleKeyInfo