Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.
Pascal C. Hein edited this page Apr 11, 2018 · 4 revisions

!! Need documentation and example for other sort of Row? !!

Static Rows:

            // 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);

Dynamic Rows:

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).