Mpdreamz / shellprogressbar

ShellProgressBar - display progress in your console application
MIT License
1.43k stars 134 forks source link

ScrollChildrenIntoView flag to indicate if next layer of progress bar… #41

Closed DanielHartl closed 4 years ago

DanielHartl commented 5 years ago

…s should be shown when progressbar is on bottom of the screen

DanielHartl commented 5 years ago

This should address issue #36 and #24

KrisztianKaszas commented 5 years ago

Hi, I tested this solution, it spawns a child correctly, BUT the ResetToBottom Function will fail to clean up children if cursorTop > windowHeight (since cusorTop reflects to the buffer and windowHeight to the window itself), so that the Child will not be cleaned up. Maybe the windowHeight should be the sum of Console.WindowHeight und Console.WindowTop? Best Regards Krisztian

KrisztianKaszas commented 5 years ago

Since I do not have the privileges to commit, I just made some minor adjustments in order to get ResetToBottom to work when Console.CursorTop is > Console.WindowHeight.

ProgressBar.zip

Here are my changes highlighted: image

Mpdreamz commented 4 years ago

@KrisztianKaszas if you can submit a PR for this that would be greatly appreciated :+1:

Mpdreamz commented 4 years ago

Or @DanielHartl if you could update your PR of course :smile_cat:

Shrafe commented 4 years ago

+1 for this change, would be helpful for my use case.

Mpdreamz commented 4 years ago

Thank you @DanielHartl @KrisztianKaszas sorry for taking long to get this in.

I took this PR and extended it with: https://github.com/Mpdreamz/shellprogressbar/pull/57

Which is now on master will look at releasing this soon.