Skip to content
This repository was archived by the owner on Oct 16, 2022. It is now read-only.

Commit 2bbee75

Browse files
Update Readme.md
1 parent 0c9a2cd commit 2bbee75

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

Readme.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,32 @@
44

55
# console loadingbar
66

7+
## USAGE
78

8-
### Other Versions
9+
To include the Lib, you need to `add_subdirectory("consoleLoadingbar")` in your `CMakeLists.txt` if you download this repo into `%yourProject%/consoleLoadingbar`.
10+
11+
You need to link `sharks::consoleLoadingBar` in your project
12+
13+
Include the loading bar header at the top of the C++ file where you like to use it (`#include <consoleLoadingBar.h>`)
14+
15+
Create a object of class (Example: `CloadingBarConsole bar`)
16+
17+
Now you can set the value of Percent: `bar.setPercent(30);`
18+
19+
You can also change the color of your bar with following colorcodes:
20+
21+
COLORCODE | Color | EXAMPLE
22+
--------------------- | ------ | ---------
23+
`colorcode::OK` | Green | `bar.setColorCode(colorcode::OK);` or `bar.setColorCode();`
24+
`colorcode::SUSPEND` | Yellow | `bar.setColorCode(colorcode::SUSPEND);`
25+
`colorcode::CANCEL` | Red | `bar.setColorCode(colorcode::CANCEL);`
26+
27+
28+
29+
To see the Bar, render it after every change (or continuing in a seperate thread) render means also resizing to console window `bar.render();`
30+
31+
32+
## Other Versions
933
- [MSBUILD DLL VERSION](https://github.com/Sharkbyteprojects/consoleLoadingBar-win) ([![MSBuild](https://github.com/Sharkbyteprojects/consoleLoadingBar-win/actions/workflows/msbuild.yml/badge.svg)](https://github.com/Sharkbyteprojects/consoleLoadingBar-win/actions/workflows/msbuild.yml) [![CodeQL](https://github.com/Sharkbyteprojects/consoleLoadingBar-win/actions/workflows/codeql.yml/badge.svg)](https://github.com/Sharkbyteprojects/consoleLoadingBar-win/actions/workflows/codeql.yml))
1034

1135
&copy; Sharkbyteprojects

0 commit comments

Comments
 (0)