Skip to content

Commit

Permalink
Modify the progress bar to a simple version that does not require uni…
Browse files Browse the repository at this point in the history
…code support.
  • Loading branch information
izwb003 committed Feb 17, 2024
1 parent 0fd92a9 commit 2ea93ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(CineIA_CLI VERSION 0.2.0)
project(CineIA_CLI VERSION 0.2.1)

# Init CMake
cmake_policy(SET CMP0048 NEW)
Expand Down
12 changes: 8 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright (c) 2024. Steven Song (izwb-003)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,7 +25,7 @@
#include <AS_02_IAB.h>
#include <AS_DCP.h>

#include <indicators/block_progress_bar.hpp>
#include <indicators/progress_bar.hpp>
#include <indicators/cursor_control.hpp>

#include "cineia.h"
Expand Down Expand Up @@ -458,8 +458,13 @@ int main(int argc, const char* argv[]) {

// Build a progress bar
indicators::show_console_cursor(false);
indicators::BlockProgressBar bar{
indicators::ProgressBar bar{
indicators::option::BarWidth{40},
indicators::option::Start{"["},
indicators::option::Fill{"="},
indicators::option::Lead{"="},
indicators::option::Remainder{" "},
indicators::option::End{"]"},
indicators::option::ForegroundColor{indicators::Color::green},
indicators::option::ShowElapsedTime{true},
indicators::option::ShowRemainingTime{true},
Expand Down Expand Up @@ -548,7 +553,6 @@ int main(int argc, const char* argv[]) {
writer.WriteFrame(oFrameBuffer);
}

bar.mark_as_completed();
indicators::show_console_cursor(true);

printf("Closing files...");
Expand Down

0 comments on commit 2ea93ac

Please sign in to comment.