mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-16 04:18:51 +08:00
Moved Color enum class out of progressbar
This commit is contained in:
6
include/indicator/color.hpp
Normal file
6
include/indicator/color.hpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
#include <indicator/termcolor.hpp>
|
||||
|
||||
namespace indicator {
|
||||
enum class Color { GREY, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE };
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <atomic>
|
||||
#include <indicator/termcolor.hpp>
|
||||
#include <indicator/color.hpp>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
@@ -10,8 +10,6 @@ namespace indicator {
|
||||
|
||||
class ProgressBar {
|
||||
public:
|
||||
enum class Color { GREY, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE };
|
||||
|
||||
void set_foreground_color(Color color) {
|
||||
std::unique_lock<std::mutex> lock{_mutex};
|
||||
_foreground_color = color;
|
||||
|
||||
Reference in New Issue
Block a user