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:
18
README.md
18
README.md
@@ -38,7 +38,9 @@ int main() {
|
||||
bar.fill_bar_remainder_with(" ");
|
||||
bar.end_bar_with("]");
|
||||
bar.set_postfix_text("Getting started");
|
||||
bar.set_foreground_color(indicators::Color::GREEN);
|
||||
bar.set_foreground_color(indicators::Color::GREEN);
|
||||
bar.hide_elapsed_time();
|
||||
bar.hide_remaining_time();
|
||||
|
||||
// Update bar state
|
||||
|
||||
@@ -78,6 +80,8 @@ int main() {
|
||||
bar.end_bar_with("]");
|
||||
bar.set_postfix_text("Getting started");
|
||||
bar.set_foreground_color(indicators::Color::GREEN);
|
||||
bar.hide_elapsed_time();
|
||||
bar.hide_remaining_time();
|
||||
|
||||
// Update bar state
|
||||
while (true) {
|
||||
@@ -114,6 +118,8 @@ int main() {
|
||||
bar.end_bar_with("]");
|
||||
bar.set_postfix_text("Getting started");
|
||||
bar.set_foreground_color(indicators::Color::GREEN);
|
||||
bar.hide_elapsed_time();
|
||||
bar.hide_remaining_time();
|
||||
|
||||
// Update bar state
|
||||
|
||||
@@ -154,6 +160,8 @@ int main() {
|
||||
bar.fill_bar_remainder_with("-");
|
||||
bar.end_bar_with("]");
|
||||
bar.set_foreground_color(indicators::Color::YELLOW);
|
||||
bar.hide_elapsed_time();
|
||||
bar.hide_remaining_time();
|
||||
|
||||
// As configured, the bar will look like this:
|
||||
//
|
||||
@@ -231,6 +239,8 @@ int main() {
|
||||
bar.start_bar_with("[");
|
||||
bar.end_bar_with("]");
|
||||
bar.set_foreground_color(indicators::Color::WHITE);
|
||||
bar.hide_elapsed_time();
|
||||
bar.hide_remaining_time();
|
||||
|
||||
// Update bar state
|
||||
auto progress = 0.0f;
|
||||
@@ -264,6 +274,8 @@ int main() {
|
||||
spinner.set_postfix_text("Checking credentials");
|
||||
spinner.set_foreground_color(indicators::Color::YELLOW);
|
||||
spinner.set_spinner_states({"⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂", "⠁"});
|
||||
spinner.hide_elapsed_time();
|
||||
spinner.hide_remaining_time();
|
||||
|
||||
// Update spinner state
|
||||
|
||||
@@ -289,6 +301,8 @@ int main() {
|
||||
spinner.set_postfix_text("Checking credentials");
|
||||
spinner.set_foreground_color(indicators::Color::YELLOW);
|
||||
spinner.set_spinner_states({"⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂", "⠁"});
|
||||
spinner.hide_elapsed_time();
|
||||
spinner.hide_remaining_time();
|
||||
|
||||
// Update spinner state
|
||||
auto job = [&spinner]() {
|
||||
@@ -299,7 +313,7 @@ int main() {
|
||||
spinner.hide_spinner();
|
||||
spinner.hide_percentage();
|
||||
spinner.set_postfix_text("Authenticated!");
|
||||
spinner.mark_as_completed();
|
||||
spinner.mark_as_completed();
|
||||
break;
|
||||
} else
|
||||
spinner.tick();
|
||||
|
||||
Reference in New Issue
Block a user