mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-16 04:18:51 +08:00
Updated sample
This commit is contained in:
@@ -16,7 +16,7 @@ int main() {
|
|||||||
|
|
||||||
// As configured, the bar will look like this:
|
// As configured, the bar will look like this:
|
||||||
//
|
//
|
||||||
// [■■■■■■■■■■■■■■■■■■■■--------] 70%
|
// [■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-------------] 70%
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -34,6 +34,13 @@ int main() {
|
|||||||
"Watching paint dry"
|
"Watching paint dry"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Let's say you want to append some status text to the right of the progress bar
|
||||||
|
// You can use bar.append_text(...) to append text to the right
|
||||||
|
//
|
||||||
|
// [■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-------------] 70% Finding a replacement engineer
|
||||||
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
//
|
||||||
|
|
||||||
auto job = [&bar, &index, &status_text]() {
|
auto job = [&bar, &index, &status_text]() {
|
||||||
while (true) {
|
while (true) {
|
||||||
if (bar.completed()) {
|
if (bar.completed()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user