mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-12 17:58:55 +08:00
Fixed build
This commit is contained in:
@@ -17,7 +17,9 @@ int main() {
|
||||
option::Lead{"■"},
|
||||
option::Remainder{" "},
|
||||
option::End{" ]"},
|
||||
option::ForegroundColor{indicators::Color::yellow}};
|
||||
option::ForegroundColor{indicators::Color::yellow},
|
||||
option::FontStyles{
|
||||
std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}};
|
||||
|
||||
std::atomic<size_t> index{0};
|
||||
std::vector<std::string> status_text = {"Rocket.exe is not responding",
|
||||
@@ -58,6 +60,7 @@ int main() {
|
||||
p.set_option(option::End{""});
|
||||
p.set_option(option::ForegroundColor{indicators::Color::white});
|
||||
p.set_option(option::ShowPercentage{false});
|
||||
p.set_option(option::FontStyles{std::vector<indicators::FontStyle>{indicators::FontStyle::bold}});
|
||||
auto job = [&p]() {
|
||||
while (true) {
|
||||
p.set_option(
|
||||
@@ -88,6 +91,7 @@ int main() {
|
||||
p.set_option(option::End{"]"});
|
||||
p.set_option(option::PostfixText{"Getting started"});
|
||||
p.set_option(option::ForegroundColor{indicators::Color::green});
|
||||
p.set_option(option::FontStyles{std::vector<indicators::FontStyle>{indicators::FontStyle::bold}});
|
||||
auto job = [&p]() {
|
||||
while (true) {
|
||||
auto ticks = p.current();
|
||||
@@ -124,6 +128,7 @@ int main() {
|
||||
p4.set_option(option::ForegroundColor{indicators::Color::cyan});
|
||||
p4.set_option(option::PostfixText{"Restoring system state"});
|
||||
p4.set_option(option::ShowPercentage{false});
|
||||
p4.set_option(option::FontStyles{std::vector<indicators::FontStyle>{indicators::FontStyle::bold}});
|
||||
std::atomic<size_t> index4{0};
|
||||
auto job4 = [&p4, &index4, &lead_spinner]() {
|
||||
while (true) {
|
||||
@@ -163,7 +168,9 @@ int main() {
|
||||
option::Remainder{"-"},
|
||||
option::End{"]"},
|
||||
option::ForegroundColor{indicators::Color::white},
|
||||
option::PostfixText{"Reverting system restore"}};
|
||||
option::PostfixText{"Reverting system restore"},
|
||||
option::FontStyles{
|
||||
std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}};
|
||||
p.set_progress(100); // TODO backwards as an option?
|
||||
std::atomic<size_t> progress{100};
|
||||
auto job = [&p, &progress]() {
|
||||
@@ -190,7 +197,8 @@ int main() {
|
||||
indicators::ProgressSpinner p{
|
||||
option::PrefixText{""}, option::PostfixText{"Checking credentials"},
|
||||
option::ForegroundColor{indicators::Color::yellow},
|
||||
option::SpinnerStates{std::vector<std::string>{"⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂", "⠁"}}};
|
||||
option::SpinnerStates{std::vector<std::string>{"⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂", "⠁"}},
|
||||
option::FontStyles{std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}};
|
||||
|
||||
auto job = [&p]() {
|
||||
while (true) {
|
||||
@@ -219,7 +227,8 @@ int main() {
|
||||
indicators::ProgressSpinner p{
|
||||
option::PrefixText{" - "}, option::PostfixText{"Searching for the Moon"},
|
||||
option::ForegroundColor{indicators::Color::white}, option::ShowPercentage{false},
|
||||
option::SpinnerStates{std::vector<std::string>{"▖", "▘", "▝", "▗"}}};
|
||||
option::SpinnerStates{std::vector<std::string>{"▖", "▘", "▝", "▗"}},
|
||||
option::FontStyles{std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}};
|
||||
auto job = [&p]() {
|
||||
while (true) {
|
||||
auto current = p.current();
|
||||
@@ -263,7 +272,9 @@ int main() {
|
||||
option::Remainder{" "},
|
||||
option::End{"🌑"},
|
||||
option::PostfixText{"Achieved low-Earth orbit"},
|
||||
option::ForegroundColor{indicators::Color::white}};
|
||||
option::ForegroundColor{indicators::Color::white},
|
||||
option::FontStyles{
|
||||
std::vector<indicators::FontStyle>{indicators::FontStyle::bold}}};
|
||||
std::vector<std::string> ship_trail{"⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"};
|
||||
std::atomic<int> ship_trail_index{0};
|
||||
auto job2 = [&p2, &ship_trail_index, &ship_trail]() {
|
||||
|
||||
Reference in New Issue
Block a user