Progress Bars
"When will I be able to try out Terminaux 7.0?" "Soon, just please wait."
Progress bar with text
var stickScreen = new Screen()
{
CycleFrequency = 50,
};
var progressBar = new ProgressBar(
"This is the test progress bar that contains a scrolling marquee.", 0, 100)
{
Width = ConsoleWrapper.WindowWidth - 8,
};
try
{
// First, clear the screen
ColorTools.LoadBack();
// Then, show the progress bar
var stickScreenPart = new ScreenPart();
stickScreenPart.Position(4, ConsoleWrapper.WindowHeight - 1);
stickScreenPart.AddDynamicText(progressBar.Render);
stickScreen.AddBufferedPart("Test", stickScreenPart);
ScreenTools.SetCurrent(stickScreen);
ScreenTools.SetCurrentCyclic(stickScreen);
ScreenTools.StartCyclicScreen();
// Finally, increment the progress bar until it's full
for (int progress = 0; progress < 100; progress++)
{
progressBar.Position = progress;
Thread.Sleep(100);
}
}
catch (Exception ex)
{
InfoBoxModalColor.WriteInfoBoxModal($"Screen failed to render: {ex.Message}");
}
finally
{
ScreenTools.StopCyclicScreen();
ScreenTools.UnsetCurrent(stickScreen);
ColorTools.LoadBack();
}

Progress bar without text


Simple progress bars




Slider


Spinner
