mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-16 04:18:51 +08:00
Updated README
This commit is contained in:
15
README.md
15
README.md
@@ -226,6 +226,15 @@ Are you in need of a smooth block progress bar using [unicode block elements](ht
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
#include <indicators/block_progress_bar.hpp>
|
||||||
|
#include <thread>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
// Hide cursor
|
||||||
|
std::cout << "\e[?25l";
|
||||||
|
|
||||||
indicators::BlockProgressBar bar;
|
indicators::BlockProgressBar bar;
|
||||||
|
|
||||||
// Configure the bar
|
// Configure the bar
|
||||||
@@ -243,6 +252,12 @@ Are you in need of a smooth block progress bar using [unicode block elements](ht
|
|||||||
break;
|
break;
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show cursor
|
||||||
|
std::cout << "\e[?25h";
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
# Progress Spinner
|
# Progress Spinner
|
||||||
|
|||||||
Reference in New Issue
Block a user