Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Progress Bar

Alexander Bruun edited this page Sep 25, 2019 · 3 revisions

The following parameters are needed for the progressbar

nk_size currentValue = 45;
nk_size maxValue = 100;
nk_modify modifyable = NK_MODIFIABLE;

modifyable can be NK_FIXED or NK_MODIFIABLE. If the modifier is set to NK_MODIFIABLE the user can change the value of the progress bar by clicking on it (like the slider)

To render the progressbar just call nk_progress

if( nk_progress(ctx, &currentValue, maxValue , modifyable ) )
{
    // the value of the progress bar changed, the new value is stored in currentValue
}

Clone this wiki locally