This repository has been archived by the owner on Dec 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Row
Pascal C. Hein edited this page Apr 11, 2018
·
4 revisions
!! Need documentation and example for other sort of Row? !!
// This will create a row layout with a single collumn
nk_layout_row_begin(ctx, NK_STATIC, 30, 1);
{
nk_layout_row_push(ctx, 100);
nk_label(ctx, "First Row", NK_TEXT_LEFT);
nk_layout_row_push(ctx, 100);
nk_label(ctx, "Second Row", NK_TEXT_LEFT);
}
nk_layout_row_end(ctx);
Defining dynamic rows works similarly. Instead of NK_STATIC you need to use NK_DYNAMIC.
The second argument of nk_layout_row_push has a different meaning when working with dynamic rows.
For static rows it describes an absolute width. Dynamic rows use a width percentage instead (e.g. 0.25f for 25% width).