Progress bar methods.
More...
|
| void | init (uint32_t maxProgress) |
| void | init (uint32_t maxProgress, uint8_t lineOffset) |
| void | advance (uint32_t steps=1) |
| void | finish () |
| void | render (bool end=false) |
|
| uint32_t | current = 0 |
| uint32_t | total = 0 |
|
uint32_t | lastUpdate = 0 |
◆ advance()
| void OSCR::UI::ProgressBar::advance |
( |
uint32_t | steps = 1 | ) |
|
|
extern |
Advance the progress bar.
- Parameters
-
| steps | The amount to advance by (default: 1). |
◆ finish()
| void OSCR::UI::ProgressBar::finish |
( |
| ) |
|
|
extern |
Finish the progress bar (set current to total and render it).
◆ init() [1/2]
| void OSCR::UI::ProgressBar::init |
( |
uint32_t | maxProgress | ) |
|
|
extern |
Initilize the progress bar with the provided max/target value.
- Parameters
-
| maxProgress | The maximum the progress bar will reach. |
◆ init() [2/2]
| void OSCR::UI::ProgressBar::init |
( |
uint32_t | maxProgress, |
|
|
uint8_t | lineOffset ) |
|
extern |
Initilize the progress bar offset by lineOffset lines with the provided max/target value.
- Parameters
-
| maxProgress | The maximum the progress bar will reach. |
| maxProgress | Number of lines to offset the bar by. |
- Note
- Not all interfaces support changing lines.
◆ render()
| void OSCR::UI::ProgressBar::render |
( |
bool | end = false | ) |
|
|
extern |
Render an updated progress bar.
◆ current
| uint32_t OSCR::UI::ProgressBar::current = 0 |
◆ total
| uint32_t OSCR::UI::ProgressBar::total = 0 |
The total of the progress bar or 0 if not known.