mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-16 04:18:51 +08:00
Updated enums to lowercase per the core guidelines. Bumped to wip v1.7
This commit is contained in:
@@ -5,7 +5,7 @@ int main() {
|
||||
using namespace indicators;
|
||||
BlockProgressBar bar1{
|
||||
option::BarWidth{50},
|
||||
option::ForegroundColor{Color::YELLOW},
|
||||
option::ForegroundColor{Color::yellow},
|
||||
option::ShowElapsedTime{true},
|
||||
option::ShowRemainingTime{true},
|
||||
option::PrefixText{"Progress Bar #1 "}
|
||||
@@ -13,7 +13,7 @@ int main() {
|
||||
|
||||
BlockProgressBar bar2{
|
||||
option::BarWidth{50},
|
||||
option::ForegroundColor{Color::CYAN},
|
||||
option::ForegroundColor{Color::cyan},
|
||||
option::ShowElapsedTime{true},
|
||||
option::ShowRemainingTime{true},
|
||||
option::PrefixText{"Progress Bar #2 "}
|
||||
@@ -21,7 +21,7 @@ int main() {
|
||||
|
||||
BlockProgressBar bar3{
|
||||
option::BarWidth{50},
|
||||
option::ForegroundColor{Color::RED},
|
||||
option::ForegroundColor{Color::red},
|
||||
option::ShowElapsedTime{true},
|
||||
option::ShowRemainingTime{true},
|
||||
option::PrefixText{"Progress Bar #3 "}
|
||||
|
||||
@@ -10,7 +10,7 @@ int main() {
|
||||
indicators::option::Lead{"■"},
|
||||
indicators::option::Remainder{" "},
|
||||
indicators::option::End{" ]"},
|
||||
indicators::option::ForegroundColor{indicators::Color::YELLOW},
|
||||
indicators::option::ForegroundColor{indicators::Color::yellow},
|
||||
indicators::option::ShowElapsedTime{true},
|
||||
indicators::option::ShowRemainingTime{true},
|
||||
indicators::option::PrefixText{"Progress Bar #1 "}
|
||||
@@ -23,7 +23,7 @@ int main() {
|
||||
indicators::option::Lead{">"},
|
||||
indicators::option::Remainder{" "},
|
||||
indicators::option::End{" ]"},
|
||||
indicators::option::ForegroundColor{indicators::Color::CYAN},
|
||||
indicators::option::ForegroundColor{indicators::Color::cyan},
|
||||
indicators::option::ShowElapsedTime{true},
|
||||
indicators::option::ShowRemainingTime{true},
|
||||
indicators::option::PrefixText{"Progress Bar #2 "}
|
||||
@@ -36,7 +36,7 @@ int main() {
|
||||
indicators::option::Lead{"#"},
|
||||
indicators::option::Remainder{" "},
|
||||
indicators::option::End{" ]"},
|
||||
indicators::option::ForegroundColor{indicators::Color::RED},
|
||||
indicators::option::ForegroundColor{indicators::Color::red},
|
||||
indicators::option::ShowElapsedTime{true},
|
||||
indicators::option::ShowRemainingTime{true},
|
||||
indicators::option::PrefixText{"Progress Bar #3 "}
|
||||
|
||||
@@ -10,7 +10,7 @@ int main() {
|
||||
indicators::option::Lead{"■"},
|
||||
indicators::option::Remainder{"-"},
|
||||
indicators::option::End{" ]"},
|
||||
indicators::option::ForegroundColor{indicators::Color::YELLOW},
|
||||
indicators::option::ForegroundColor{indicators::Color::yellow},
|
||||
};
|
||||
|
||||
// As configured, the bar will look like this:
|
||||
|
||||
@@ -15,7 +15,7 @@ int main() {
|
||||
indicators::option::Remainder{"-"},
|
||||
indicators::option::End{" ]"},
|
||||
indicators::option::PostfixText{"Loading dependency 1/4"},
|
||||
indicators::option::ForegroundColor{indicators::Color::CYAN},
|
||||
indicators::option::ForegroundColor{indicators::Color::cyan},
|
||||
};
|
||||
|
||||
// Update bar state
|
||||
|
||||
@@ -11,7 +11,7 @@ int main() {
|
||||
indicators::option::Remainder{" "},
|
||||
indicators::option::End{" ]"},
|
||||
indicators::option::PostfixText{"Getting started"},
|
||||
indicators::option::ForegroundColor{indicators::Color::GREEN},
|
||||
indicators::option::ForegroundColor{indicators::Color::green},
|
||||
};
|
||||
|
||||
// Update bar state
|
||||
|
||||
@@ -7,7 +7,7 @@ int main() {
|
||||
|
||||
indicators::ProgressSpinner spinner{
|
||||
indicators::option::PostfixText{"Checking credentials"},
|
||||
indicators::option::ForegroundColor{indicators::Color::YELLOW},
|
||||
indicators::option::ForegroundColor{indicators::Color::yellow},
|
||||
indicators::option::SpinnerStates{std::vector<std::string>{"⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂", "⠁"}},
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ int main() {
|
||||
auto job = [&spinner]() {
|
||||
while (true) {
|
||||
if (spinner.is_completed()) {
|
||||
spinner.set_option(indicators::option::ForegroundColor{indicators::Color::GREEN});
|
||||
spinner.set_option(indicators::option::ForegroundColor{indicators::Color::green});
|
||||
spinner.set_option(indicators::option::PrefixText{"✔"});
|
||||
spinner.set_option(indicators::option::ShowSpinner{false});
|
||||
spinner.set_option(indicators::option::ShowPercentage{false});
|
||||
|
||||
@@ -10,8 +10,8 @@ int main() {
|
||||
indicators::option::Lead{"█"},
|
||||
indicators::option::Remainder{"-"},
|
||||
indicators::option::End{"]"},
|
||||
indicators::option::PostfixText{"Training Gaze Network "},
|
||||
indicators::option::ForegroundColor{indicators::Color::YELLOW},
|
||||
indicators::option::PrefixText{"Training Gaze Network 👀"},
|
||||
indicators::option::ForegroundColor{indicators::Color::yellow},
|
||||
indicators::option::ShowElapsedTime{true},
|
||||
indicators::option::ShowRemainingTime{true},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user